pub enum WitTypeNode {
Show 22 variants
RecordType(Vec<(String, NodeIndex)>),
VariantType(Vec<(String, Option<NodeIndex>)>),
EnumType(Vec<String>),
FlagsType(Vec<String>),
TupleType(Vec<NodeIndex>),
ListType(NodeIndex),
OptionType(NodeIndex),
ResultType((Option<NodeIndex>, Option<NodeIndex>)),
PrimU8Type,
PrimU16Type,
PrimU32Type,
PrimU64Type,
PrimS8Type,
PrimS16Type,
PrimS32Type,
PrimS64Type,
PrimF32Type,
PrimF64Type,
PrimCharType,
PrimBoolType,
PrimStringType,
HandleType((ResourceId, ResourceMode)),
}Expand description
Represents a type within a wit-type definition. node-index values are indices into the
parent wit-type’s nodes list.
Variants§
RecordType(Vec<(String, NodeIndex)>)
Record type, defined by a list of name-type pairs.
VariantType(Vec<(String, Option<NodeIndex>)>)
Variant type, defined by a list of name-type pairs. The type is optional, in case it is not defined, the case is a unit case.
EnumType(Vec<String>)
Enum type, defined by a list of its cases.
FlagsType(Vec<String>)
Flags type, defined by a list of its flags.
TupleType(Vec<NodeIndex>)
Tuple type, defined by a list of its field’s types.
ListType(NodeIndex)
List type, defined by the element type
OptionType(NodeIndex)
Option type, defined by the element type
ResultType((Option<NodeIndex>, Option<NodeIndex>))
Result type, defined by the success and error types. Both types are optional, in case they are not defined, the ok or error case is a unit case.
PrimU8Type
Unsigned 8-bit integer
PrimU16Type
Unsigned 16-bit integer
PrimU32Type
Unsigned 32-bit integer
PrimU64Type
Unsigned 64-bit integer
PrimS8Type
Signed 8-bit integer
PrimS16Type
Signed 16-bit integer
PrimS32Type
Signed 32-bit integer
PrimS64Type
Signed 64-bit integer
PrimF32Type
32-bit floating point number
PrimF64Type
64-bit floating point number
PrimCharType
Unicode character
PrimBoolType
Boolean value
PrimStringType
String value
HandleType((ResourceId, ResourceMode))
Handle type, defined by a resource ID and borrowing mode
Trait Implementations§
Source§impl<'de, Context> BorrowDecode<'de, Context> for WitTypeNode
impl<'de, Context> BorrowDecode<'de, Context> for WitTypeNode
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 Clone for WitTypeNode
impl Clone for WitTypeNode
Source§fn clone(&self) -> WitTypeNode
fn clone(&self) -> WitTypeNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WitTypeNode
impl Debug for WitTypeNode
Source§impl<Context> Decode<Context> for WitTypeNode
impl<Context> Decode<Context> for WitTypeNode
Source§impl Encode for WitTypeNode
impl Encode for WitTypeNode
Source§impl IntoValue for WitTypeNode
Available on crate feature host only.
impl IntoValue for WitTypeNode
host only.fn into_value(self) -> Value
fn get_type() -> AnalysedType
impl ComponentType for WitTypeNode
impl Lift for WitTypeNode
impl Lower for WitTypeNode
Auto Trait Implementations§
impl Freeze for WitTypeNode
impl RefUnwindSafe for WitTypeNode
impl Send for WitTypeNode
impl Sync for WitTypeNode
impl Unpin for WitTypeNode
impl UnwindSafe for WitTypeNode
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