pub enum ComponentDefinedType {
Primitive(PrimitiveValType),
Record(RecordType),
Variant(VariantType),
List(ComponentValType),
Tuple(TupleType),
Flags(IndexSet<KebabString>),
Enum(IndexSet<KebabString>),
Option(ComponentValType),
Result {
ok: Option<ComponentValType>,
err: Option<ComponentValType>,
},
Own(AliasableResourceId),
Borrow(AliasableResourceId),
}
Expand description
Represents a component defined type.
Variants§
Primitive(PrimitiveValType)
The type is a primitive value type.
Record(RecordType)
The type is a record.
Variant(VariantType)
The type is a variant.
List(ComponentValType)
The type is a list.
Tuple(TupleType)
The type is a tuple.
Flags(IndexSet<KebabString>)
The type is a set of flags.
Enum(IndexSet<KebabString>)
The type is an enumeration.
Option(ComponentValType)
The type is an option
.
Result
The type is a result
.
Own(AliasableResourceId)
The type is an owned handle to the specified resource.
Borrow(AliasableResourceId)
The type is a borrowed handle to the specified resource.
Trait Implementations§
source§impl Clone for ComponentDefinedType
impl Clone for ComponentDefinedType
source§fn clone(&self) -> ComponentDefinedType
fn clone(&self) -> ComponentDefinedType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ComponentDefinedType
impl Debug for ComponentDefinedType
source§impl TypeData for ComponentDefinedType
impl TypeData for ComponentDefinedType
source§type Id = ComponentDefinedTypeId
type Id = ComponentDefinedTypeId
The identifier for this type data.
Auto Trait Implementations§
impl Freeze for ComponentDefinedType
impl RefUnwindSafe for ComponentDefinedType
impl Send for ComponentDefinedType
impl Sync for ComponentDefinedType
impl Unpin for ComponentDefinedType
impl UnwindSafe for ComponentDefinedType
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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