Enum ComponentDefinedType
pub enum ComponentDefinedType {
Show 15 variants
Primitive(PrimitiveValType),
Record(RecordType),
Variant(VariantType),
List {
element: ComponentValType,
info: TypeInfo,
},
Map {
key: ComponentValType,
value: ComponentValType,
info: TypeInfo,
},
FixedLengthList {
element: ComponentValType,
length: u32,
info: TypeInfo,
},
Tuple(TupleType),
Flags(IndexSet<KebabString>),
Enum(IndexSet<KebabString>),
Option {
ty: ComponentValType,
info: TypeInfo,
},
Result {
ok: Option<ComponentValType>,
err: Option<ComponentValType>,
info: TypeInfo,
},
Own(AliasableResourceId),
Borrow(AliasableResourceId),
Future {
ty: Option<ComponentValType>,
info: TypeInfo,
},
Stream {
ty: Option<ComponentValType>,
info: TypeInfo,
},
}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
The type is a list.
Fields
element: ComponentValTypeThe element type of the list.
info: TypeInfoCached type information.
Map
The type is a map.
Fields
key: ComponentValTypeThe key type of the map.
value: ComponentValTypeThe value type of the map.
info: TypeInfoCached type information.
FixedLengthList
The type is a fixed-length list.
Fields
element: ComponentValTypeThe element type of the list.
info: TypeInfoCached type information.
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
The type is an option.
Result
The type is a result.
Fields
ok: Option<ComponentValType>The ok type.
err: Option<ComponentValType>The error type.
info: TypeInfoCached type information.
Own(AliasableResourceId)
The type is an owned handle to the specified resource.
Borrow(AliasableResourceId)
The type is a borrowed handle to the specified resource.
Future
A future type with the specified payload type.
Fields
ty: Option<ComponentValType>The payload type of the future, if any.
info: TypeInfoCached type information.
Stream
A stream type with the specified payload type.
Fields
ty: Option<ComponentValType>The payload type of the stream, if any.
info: TypeInfoCached type information.
Trait Implementations§
§impl Clone for ComponentDefinedType
impl Clone for ComponentDefinedType
§fn clone(&self) -> ComponentDefinedType
fn clone(&self) -> ComponentDefinedType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ComponentDefinedType
impl Debug for ComponentDefinedType
§impl TypeData for ComponentDefinedType
impl TypeData for ComponentDefinedType
§const IS_CORE_SUB_TYPE: bool = false
const IS_CORE_SUB_TYPE: bool = false
§type Id = ComponentDefinedTypeId
type Id = ComponentDefinedTypeId
Auto Trait Implementations§
impl Freeze for ComponentDefinedType
impl RefUnwindSafe for ComponentDefinedType
impl Send for ComponentDefinedType
impl Sync for ComponentDefinedType
impl Unpin for ComponentDefinedType
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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