pub enum ComponentDefinedType {
Primitive(PrimitiveValType),
Record(RecordType),
Variant(VariantType),
List(ComponentValType),
Tuple(TupleType),
Flags(IndexSet<KebabString, RandomState>),
Enum(IndexSet<KebabString, RandomState>),
Union(UnionType),
Option(ComponentValType),
Result {
ok: Option<ComponentValType>,
err: Option<ComponentValType>,
},
}
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, RandomState>)
The type is a set of flags.
Enum(IndexSet<KebabString, RandomState>)
The type is an enumeration.
Union(UnionType)
The type is a union.
Option(ComponentValType)
The type is an option
.
Result
The type is a result
.
Implementations§
source§impl ComponentDefinedType
impl ComponentDefinedType
sourcepub fn is_subtype_of(
a: &ComponentDefinedType,
at: TypesRef<'_>,
b: &ComponentDefinedType,
bt: TypesRef<'_>
) -> bool
pub fn is_subtype_of( a: &ComponentDefinedType, at: TypesRef<'_>, b: &ComponentDefinedType, bt: TypesRef<'_> ) -> bool
Determines if component defined type a
is a subtype of b
.
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 more