pub enum ComponentDefinedType {
Primitive(PrimitiveValType),
Record(RecordType),
Variant(VariantType),
List(ComponentValType),
Tuple(TupleType),
Flags(IndexSet<String, RandomState>),
Enum(IndexSet<String, 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<String, RandomState>)
The type is a set of flags.
Enum(IndexSet<String, 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
sourceimpl 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
sourceimpl Clone for ComponentDefinedType
impl Clone for ComponentDefinedType
sourcefn clone(&self) -> ComponentDefinedType
fn clone(&self) -> ComponentDefinedType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for ComponentDefinedType
impl Send for ComponentDefinedType
impl Sync for ComponentDefinedType
impl Unpin for ComponentDefinedType
impl UnwindSafe for ComponentDefinedType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more