pub enum Type {
Show 23 variants
Bool,
S8,
U8,
S16,
U16,
S32,
U32,
S64,
U64,
Float32,
Float64,
Char,
String,
List(List),
Record(Record),
Tuple(Tuple),
Variant(Variant),
Enum(Enum),
Option(OptionType),
Result(ResultType),
Flags(Flags),
Own(ResourceType),
Borrow(ResourceType),
}Available on crate feature
component-model only.Expand description
Represents a component model interface type
Variants§
Bool
S8
U8
S16
U16
S32
U32
S64
U64
Float32
Float64
Char
String
List(List)
Record(Record)
Tuple(Tuple)
Variant(Variant)
Enum(Enum)
Option(OptionType)
Result(ResultType)
Flags(Flags)
Own(ResourceType)
Borrow(ResourceType)
Implementations§
Source§impl Type
impl Type
Sourcepub fn unwrap_list(&self) -> &List
Available on crate feature runtime only.
pub fn unwrap_list(&self) -> &List
runtime only.Sourcepub fn unwrap_record(&self) -> &Record
Available on crate feature runtime only.
pub fn unwrap_record(&self) -> &Record
runtime only.Sourcepub fn unwrap_tuple(&self) -> &Tuple
Available on crate feature runtime only.
pub fn unwrap_tuple(&self) -> &Tuple
runtime only.Sourcepub fn unwrap_variant(&self) -> &Variant
Available on crate feature runtime only.
pub fn unwrap_variant(&self) -> &Variant
runtime only.Retrieve the inner Variant of a Type::Variant.
§Panics
This will panic if self is not a Type::Variant.
Sourcepub fn unwrap_enum(&self) -> &Enum
Available on crate feature runtime only.
pub fn unwrap_enum(&self) -> &Enum
runtime only.Sourcepub fn unwrap_option(&self) -> &OptionType
Available on crate feature runtime only.
pub fn unwrap_option(&self) -> &OptionType
runtime only.Retrieve the inner OptionType of a Type::Option.
§Panics
This will panic if self is not a Type::Option.
Sourcepub fn unwrap_result(&self) -> &ResultType
Available on crate feature runtime only.
pub fn unwrap_result(&self) -> &ResultType
runtime only.Retrieve the inner ResultType of a Type::Result.
§Panics
This will panic if self is not a Type::Result.
Sourcepub fn unwrap_flags(&self) -> &Flags
Available on crate feature runtime only.
pub fn unwrap_flags(&self) -> &Flags
runtime only.Sourcepub fn unwrap_own(&self) -> &ResourceType
Available on crate feature runtime only.
pub fn unwrap_own(&self) -> &ResourceType
runtime only.Sourcepub fn unwrap_borrow(&self) -> &ResourceType
Available on crate feature runtime only.
pub fn unwrap_borrow(&self) -> &ResourceType
runtime only.Retrieve the inner ResourceType of a Type::Borrow.
§Panics
This will panic if self is not a Type::Borrow.
Trait Implementations§
impl Eq for Type
Available on crate feature
runtime only.impl StructuralPartialEq for Type
Available on crate feature
runtime only.Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
Converts
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>
Converts
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