pub struct Custom { /* private fields */ }Expand description
Custom sections have the id 0. They are intended to be used for debugging information or third-party extensions, and are ignored by the WebAssembly semantics. Their contents consist of a name further identifying the custom section, followed by an uninterpreted sequence of bytes for custom use.
See https://webassembly.github.io/spec/core/binary/modules.html#binary-customsec
§Examples
use wasm_ast::{Custom, Name};
let name = "version";
let version = b"1.0.0";
let custom = Custom::new(name.into(), version.to_vec());
assert_eq!(custom.name(), &Name::new(name.to_string()));
assert_eq!(custom.bytes(), &version[..]);Implementations§
Trait Implementations§
impl StructuralPartialEq for Custom
Auto Trait Implementations§
impl Freeze for Custom
impl RefUnwindSafe for Custom
impl Send for Custom
impl Sync for Custom
impl Unpin for Custom
impl UnwindSafe for Custom
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