Struct nyar_wasm::VariantType
source · pub struct VariantType {
pub symbol: WasmSymbol,
pub fields: BTreeMap<String, StructureItem>,
pub span: FileSpan,
}Fields§
§symbol: WasmSymbol§fields: BTreeMap<String, StructureItem>§span: FileSpanImplementations§
source§impl VariantType
impl VariantType
pub fn new<S: Into<WasmSymbol>>(name: S) -> Self
pub fn name(&self) -> String
pub fn set_field(&mut self, field: StructureItem)
pub fn with_fields<I>(self, fields: I) -> Selfwhere
I: IntoIterator<Item = StructureItem>,
Trait Implementations§
source§impl Clone for VariantType
impl Clone for VariantType
source§fn clone(&self) -> VariantType
fn clone(&self) -> VariantType
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 VariantType
impl Debug for VariantType
source§impl From<VariantType> for WasmType
impl From<VariantType> for WasmType
source§fn from(value: VariantType) -> Self
fn from(value: VariantType) -> Self
Converts to this type from the input type.
source§impl<'a, 'i> IntoWasm<'a, ComponentDefinedType<'i>> for VariantTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, ComponentDefinedType<'i>> for VariantTypewhere
'a: 'i,
fn as_wast(&'a self) -> ComponentDefinedType<'i>
source§impl<'a, 'i> IntoWasm<'a, Type<'i>> for VariantTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, Type<'i>> for VariantTypewhere
'a: 'i,
source§impl<'a, 'i> IntoWasm<'a, Type<'i>> for VariantTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, Type<'i>> for VariantTypewhere
'a: 'i,
source§impl<'a, 'i> IntoWasm<'a, TypeDef<'i>> for VariantTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, TypeDef<'i>> for VariantTypewhere
'a: 'i,
source§impl<'a, 'i> IntoWasm<'a, TypeDef<'i>> for VariantTypewhere
'a: 'i,
impl<'a, 'i> IntoWasm<'a, TypeDef<'i>> for VariantTypewhere
'a: 'i,
Auto Trait Implementations§
impl RefUnwindSafe for VariantType
impl Send for VariantType
impl Sync for VariantType
impl Unpin for VariantType
impl UnwindSafe for VariantType
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