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> Deserialize<'de> for Global<'a>where
'de: 'a,
impl<'de, 'a> Deserialize<'de> for Global<'a>where
'de: 'a,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Global<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Global<'a>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> Serialize for Global<'a>
impl<'a> Serialize for Global<'a>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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