pub struct ModuleType { /* private fields */ }Expand description
Represents the type of a core module.
Implementations§
Source§impl ModuleType
impl ModuleType
Sourcepub fn new() -> Self
Available on crate feature component-model only.
pub fn new() -> Self
component-model only.Creates a new core module type.
Sourcepub fn import(&mut self, module: &str, name: &str, ty: EntityType) -> &mut Self
Available on crate feature component-model only.
pub fn import(&mut self, module: &str, name: &str, ty: EntityType) -> &mut Self
component-model only.Defines an import in this module type.
Sourcepub fn ty(&mut self) -> CoreTypeEncoder<'_>
Available on crate feature component-model only.
pub fn ty(&mut self) -> CoreTypeEncoder<'_>
component-model only.Define a type in this module type.
The returned encoder must be used before adding another definition.
Sourcepub fn alias_outer_core_type(&mut self, count: u32, index: u32) -> &mut Self
Available on crate feature component-model only.
pub fn alias_outer_core_type(&mut self, count: u32, index: u32) -> &mut Self
component-model only.Defines an outer core type alias in this module type.
Sourcepub fn export(&mut self, name: &str, ty: EntityType) -> &mut Self
Available on crate feature component-model only.
pub fn export(&mut self, name: &str, ty: EntityType) -> &mut Self
component-model only.Defines an export in this module type.
Sourcepub fn type_count(&self) -> u32
Available on crate feature component-model only.
pub fn type_count(&self) -> u32
component-model only.Gets the number of types that have been added to this module type.
Trait Implementations§
Source§impl Clone for ModuleType
Available on crate feature component-model only.
impl Clone for ModuleType
Available on crate feature
component-model only.Source§fn clone(&self) -> ModuleType
fn clone(&self) -> ModuleType
Returns a duplicate 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 ModuleType
Available on crate feature component-model only.
impl Debug for ModuleType
Available on crate feature
component-model only.Source§impl Default for ModuleType
Available on crate feature component-model only.
impl Default for ModuleType
Available on crate feature
component-model only.Source§fn default() -> ModuleType
fn default() -> ModuleType
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModuleType
impl RefUnwindSafe for ModuleType
impl Send for ModuleType
impl Sync for ModuleType
impl Unpin for ModuleType
impl UnwindSafe for ModuleType
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