Enum candid::parser::value::IDLValue [−][src]
pub enum IDLValue {}Show 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(Principal, String), 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)
Text(String)
Number(String)
Float64(f64)
Variant(VariantValue)
Principal(Principal)
Service(Principal)
Int(Int)
Nat(Nat)
Nat8(u8)
Nat16(u16)
Nat32(u32)
Nat64(u64)
Int8(i8)
Int16(i16)
Int32(i32)
Int64(i64)
Float32(f32)
Implementations
impl IDLValue
[src]
impl IDLValue
[src]pub fn annotate_type(
&self,
from_parser: bool,
env: &TypeEnv,
t: &Type
) -> Result<Self>
[src]
pub fn annotate_type(
&self,
from_parser: bool,
env: &TypeEnv,
t: &Type
) -> Result<Self>
[src]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.
pub fn value_ty(&self) -> Type
[src]
Trait Implementations
impl CandidType for IDLValue
[src]
impl CandidType for IDLValue
[src]impl<'de> Deserialize<'de> for IDLValue
[src]
impl<'de> Deserialize<'de> for IDLValue
[src]fn deserialize<D>(deserializer: D) -> Result<IDLValue, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<IDLValue, D::Error> where
D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for IDLValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for IDLValue
impl Send for IDLValue
impl Sync for IDLValue
impl Unpin for IDLValue
impl UnwindSafe for IDLValue
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,