@temporary-escape/mod-sdk / OptionalU64
Class: OptionalU64
Defined in: optional-u64.ts:8
std::optional<uint64_t> equivalent for CBOR documents. AssemblyScript does not allow nullable value types, so a present flag accompanies the value; the wire format is either the integer or CBOR null, matching the engine.
Extends
Constructors
Constructor
ts
new OptionalU64(): OptionalU64;Returns
OptionalU64
Inherited from
Properties
| Property | Type | Default value | Defined in |
|---|---|---|---|
present | bool | false | optional-u64.ts:9 |
value | number | 0 | optional-u64.ts:10 |
Methods
pack()
ts
pack(enc: CborEncoder): void;Defined in: optional-u64.ts:12
Parameters
| Parameter | Type |
|---|---|
enc | CborEncoder |
Returns
void
Overrides
unpack()
ts
unpack(dec: CborVisitor): void;Defined in: optional-u64.ts:20
Parameters
| Parameter | Type |
|---|---|
dec | CborVisitor |
Returns
void
