pub struct CoreTypeSection { /* private fields */ }
Available on crate feature
component-model
only.Expand description
An encoder for the core type section of WebAssembly components.
§Example
use wasm_encoder::{Component, CoreTypeSection, ModuleType};
let mut types = CoreTypeSection::new();
types.ty().module(&ModuleType::new());
let mut component = Component::new();
component.section(&types);
let bytes = component.finish();
Implementations§
source§impl CoreTypeSection
impl CoreTypeSection
sourcepub fn ty(&mut self) -> ComponentCoreTypeEncoder<'_>
pub fn ty(&mut self) -> ComponentCoreTypeEncoder<'_>
Encode a type into this section.
The returned encoder must be finished before adding another type.
Trait Implementations§
source§impl Clone for CoreTypeSection
impl Clone for CoreTypeSection
source§fn clone(&self) -> CoreTypeSection
fn clone(&self) -> CoreTypeSection
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 ComponentSection for CoreTypeSection
impl ComponentSection for CoreTypeSection
source§impl Debug for CoreTypeSection
impl Debug for CoreTypeSection
source§impl Default for CoreTypeSection
impl Default for CoreTypeSection
source§fn default() -> CoreTypeSection
fn default() -> CoreTypeSection
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CoreTypeSection
impl RefUnwindSafe for CoreTypeSection
impl Send for CoreTypeSection
impl Sync for CoreTypeSection
impl Unpin for CoreTypeSection
impl UnwindSafe for CoreTypeSection
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)