pub enum Global<'a> {
Def(GlobalDef),
Import {
module: &'a str,
field: &'a str,
},
}
Expand description
A WebAssembly global is either defined locally, or is defined in relation to a field of another WebAssembly module.
The lifetime parameter exists to support zero-copy deserialization for the &str
fields at the
leaves of the structure. For a variant with owned types at the leaves, see
OwnedGlobal
.
Variants§
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for Global<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Global<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<'a> StructuralPartialEq for Global<'a>
Auto Trait Implementations§
impl<'a> Freeze for Global<'a>
impl<'a> RefUnwindSafe for Global<'a>
impl<'a> Send for Global<'a>
impl<'a> Sync for Global<'a>
impl<'a> Unpin for Global<'a>
impl<'a> UnwindSafe for Global<'a>
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