Type for values that can be converted to CBOR.
This is a comprehensive union type representing all values that can be encoded as CBOR using the cbor() function. It includes:
cbor()
Cbor
Uint8Array
ByteString
CborDate
CborMap
Map
Set
Matches Rust's From<T> trait implementations for CBOR.
From<T>
cbor(42); // numbercbor("hello"); // stringcbor([1, 2, 3]); // arraycbor(new Map([["key", "value"]])); // Mapcbor({ name: "Alice", age: 30 }); // plain object -> CborMap Copy
cbor(42); // numbercbor("hello"); // stringcbor([1, 2, 3]); // arraycbor(new Map([["key", "value"]])); // Mapcbor({ name: "Alice", age: 30 }); // plain object -> CborMap
Type for values that can be converted to CBOR.
This is a comprehensive union type representing all values that can be encoded as CBOR using the
cbor()function. It includes:Cbor)Uint8Array,ByteStringCborDateCborMap, arrays, JavaScriptMap, JavaScriptSetMatches Rust's
From<T>trait implementations for CBOR.