pub enum IDLValue {
Show 25 variants Bool(bool), Null, Text(String), Number(String), Float64(f64), Opt(Box<IDLValue>), Vec(Vec<IDLValue>), Record(Vec<IDLField>), Variant(VariantValue), Principal(Principal), Service(Principal), Func(PrincipalString), None, Int(Int), Nat(Nat), Nat8(u8), Nat16(u16), Nat32(u32), Nat64(u64), Int8(i8), Int16(i16), Int32(i32), Int64(i64), Float32(f32), Reserved,
}

Variants

Bool(bool)

Null

Text(String)

Number(String)

Float64(f64)

Opt(Box<IDLValue>)

Vec(Vec<IDLValue>)

Record(Vec<IDLField>)

Variant(VariantValue)

Principal(Principal)

Service(Principal)

Func(PrincipalString)

None

Int(Int)

Nat(Nat)

Nat8(u8)

Nat16(u16)

Nat32(u32)

Nat64(u64)

Int8(i8)

Int16(i16)

Int32(i32)

Int64(i64)

Float32(f32)

Reserved

Implementations

Anotate IDLValue with the given type, allowing subtyping. If IDLValue is parsed from string, we need to set from_parser to true to enable converting numbers to the expected types, and disable the opt rules.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
The associated error which can be returned from parsing.
Parses a string s to return a value of this type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.