QuickCborObject extension
An extension providing quick utility methods for handling CborObject
instances.
- on
-
- CborObject
Methods
-
cast<
T> ([String? onError]) → T -
Casts the value of the
CborObject
to the specified type, or throws aMessageException
if casting fails. -
castTo<
E, T> (E toe(T e)) → E -
Converts the value of the
CborObject
to the specified typeE
using the provided functiontoe
. -
getInteger(
) → BigInt -
Converts the value stored in the
CborObject
to a BigInt. -
getValue<
T> () → T -
Retrieves the value stored in the
CborObject
as the specified typeT
. -
hasType<
T> () → bool -
Checks whether the value stored in the
CborObject
has the specified typeT
.