Enum wasmbin::sections::CustomSection
source · #[non_exhaustive]pub enum CustomSection {
Name(Lazy<Vec<NameSubSection>>),
Producers(Lazy<Vec<ProducerField>>),
ExternalDebugInfo(Lazy<String>),
SourceMappingUrl(Lazy<String>),
BuildId(Vec<u8>),
Other(RawCustomSection),
}
Expand description
This enum supports some non-standard custom sections commonly used in tooling, but is marked
as non-exhaustive to allow for future additions that would transform some sections
currently represented by the Other
variant into new variants.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Name(Lazy<Vec<NameSubSection>>)
name
custom section.
Producers(Lazy<Vec<ProducerField>>)
producers
custom section.
ExternalDebugInfo(Lazy<String>)
external_debug_info
custom section.
SourceMappingUrl(Lazy<String>)
sourceMappingURL
custom section.
BuildId(Vec<u8>)
build_id
custom section.
Other(RawCustomSection)
A custom section that is not recognized by this library.
Implementations§
Trait Implementations§
source§impl Clone for CustomSection
impl Clone for CustomSection
source§fn clone(&self) -> CustomSection
fn clone(&self) -> CustomSection
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 CustomSection
impl Debug for CustomSection
source§impl Decode for CustomSection
impl Decode for CustomSection
source§impl Encode for CustomSection
impl Encode for CustomSection
source§impl From<CustomSection> for Section
impl From<CustomSection> for Section
source§impl Hash for CustomSection
impl Hash for CustomSection
source§impl PartialEq for CustomSection
impl PartialEq for CustomSection
source§fn eq(&self, other: &CustomSection) -> bool
fn eq(&self, other: &CustomSection) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Visit for CustomSection
impl Visit for CustomSection
source§fn visit_children<'a, VisitT: 'static, E, F: FnMut(&'a VisitT) -> Result<(), E>>(
&'a self,
f: &mut F
) -> Result<(), VisitError<E>>
fn visit_children<'a, VisitT: 'static, E, F: FnMut(&'a VisitT) -> Result<(), E>>( &'a self, f: &mut F ) -> Result<(), VisitError<E>>
Traverse the children of this value with the provided callback.
source§fn visit_children_mut<VisitT: 'static, E, F: FnMut(&mut VisitT) -> Result<(), E>>(
&mut self,
f: &mut F
) -> Result<(), VisitError<E>>
fn visit_children_mut<VisitT: 'static, E, F: FnMut(&mut VisitT) -> Result<(), E>>( &mut self, f: &mut F ) -> Result<(), VisitError<E>>
Traverse the children of this value mutably with the provided callback.
source§fn visit<'a, T: 'static, R: VisitResult, F: FnMut(&'a T) -> R>(
&'a self,
f: F
) -> Result<(), VisitError<R::Error>>
fn visit<'a, T: 'static, R: VisitResult, F: FnMut(&'a T) -> R>( &'a self, f: F ) -> Result<(), VisitError<R::Error>>
Traverse this value with the provided callback.
source§fn visit_mut<T: 'static, R: VisitResult, F: FnMut(&mut T) -> R>(
&mut self,
f: F
) -> Result<(), VisitError<R::Error>>
fn visit_mut<T: 'static, R: VisitResult, F: FnMut(&mut T) -> R>( &mut self, f: F ) -> Result<(), VisitError<R::Error>>
Traverse this value mutably with the provided callback.
impl Eq for CustomSection
impl StructuralEq for CustomSection
impl StructuralPartialEq for CustomSection
Auto Trait Implementations§
impl RefUnwindSafe for CustomSection
impl Send for CustomSection
impl Sync for CustomSection
impl Unpin for CustomSection
impl UnwindSafe for CustomSection
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