pub enum WitNode {
Show 22 variants
RecordValue(Vec<NodeIndex>),
VariantValue((u32, Option<NodeIndex>)),
EnumValue(u32),
FlagsValue(Vec<bool>),
TupleValue(Vec<NodeIndex>),
ListValue(Vec<NodeIndex>),
OptionValue(Option<NodeIndex>),
ResultValue(Result<Option<NodeIndex>, Option<NodeIndex>>),
PrimU8(u8),
PrimU16(u16),
PrimU32(u32),
PrimU64(u64),
PrimS8(i8),
PrimS16(i16),
PrimS32(i32),
PrimS64(i64),
PrimFloat32(f32),
PrimFloat64(f64),
PrimChar(char),
PrimBool(bool),
PrimString(String),
Handle((Uri, u64)),
}Expand description
One node of a wit-value
Variants§
RecordValue(Vec<NodeIndex>)
A record value defined by a list of its field values
VariantValue((u32, Option<NodeIndex>))
A variant value defined by a pair of the case index and its inner value
EnumValue(u32)
An enum value defined by a case index
FlagsValue(Vec<bool>)
A flags value defined by a list of its flag states
TupleValue(Vec<NodeIndex>)
A tuple value defined by a list of its item values
ListValue(Vec<NodeIndex>)
A list value defined by a list of its item values
OptionValue(Option<NodeIndex>)
An option value defined by an optional inner value
ResultValue(Result<Option<NodeIndex>, Option<NodeIndex>>)
A result value defined by either an ok value or an error value. Both values are optional,
where the none case represents the absence of a value.
PrimU8(u8)
Primitive unsigned 8-bit integer
PrimU16(u16)
Primitive unsigned 16-bit integer
PrimU32(u32)
Primitive unsigned 32-bit integer
PrimU64(u64)
Primitive unsigned 64-bit integer
PrimS8(i8)
Primitive signed 8-bit integer
PrimS16(i16)
Primitive signed 16-bit integer
PrimS32(i32)
Primitive signed 32-bit integer
PrimS64(i64)
Primitive signed 64-bit integer
PrimFloat32(f32)
Primitive 32-bit floating point number
PrimFloat64(f64)
Primitive 64-bit floating point number
PrimChar(char)
Primitive character
PrimBool(bool)
Primitive boolean
PrimString(String)
Primitive string
Handle((Uri, u64))
Resource handle pointing to a URI and a resource ID
Trait Implementations§
Source§impl<'de, Context> BorrowDecode<'de, Context> for WitNode
impl<'de, Context> BorrowDecode<'de, Context> for WitNode
Source§fn borrow_decode<D: BorrowDecoder<'de, Context = Context>>(
decoder: &mut D,
) -> Result<Self, DecodeError>
fn borrow_decode<D: BorrowDecoder<'de, Context = Context>>( decoder: &mut D, ) -> Result<Self, DecodeError>
Source§impl IntoValue for WitNode
Available on crate feature host only.
impl IntoValue for WitNode
host only.fn into_value(self) -> Value
fn get_type() -> AnalysedType
impl ComponentType for WitNode
impl Lift for WitNode
impl Lower for WitNode
Auto Trait Implementations§
impl Freeze for WitNode
impl RefUnwindSafe for WitNode
impl Send for WitNode
impl Sync for WitNode
impl Unpin for WitNode
impl UnwindSafe for WitNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more