pub enum DataMode {
Passive,
Active(DataModeActive),
}Variants§
Passive
Active(DataModeActive)
Trait Implementations§
Source§impl Debug for DataMode
Usually, we’d have something like this:
impl Debug for DataMode
Usually, we’d have something like this:
(module
(memory 1) ;; memory starting with 1 page
(data (i32.const 0) "abc") ;; writing the array of byte "abc" in the first memory (0) at offset 0
;; for hardcoded offsets, we'll usually use i32.const because of wasm being x86 arch
)Since the span has only the start and length and acts a reference, we print the start and end (both inclusive, notice the ‘..=’) We print it in both decimal and hexadecimal so it’s easy to trace in something like https://webassembly.github.io/wabt/demo/wat2wasm/
Auto Trait Implementations§
impl Freeze for DataMode
impl RefUnwindSafe for DataMode
impl Send for DataMode
impl Sync for DataMode
impl Unpin for DataMode
impl UnwindSafe for DataMode
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