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