pub struct OwnedGlobalSpec { /* private fields */ }Expand description
A variant of GlobalSpec with owned strings throughout.
This type is useful when directly building up a value to be serialized.
Implementations§
Source§impl OwnedGlobalSpec
impl OwnedGlobalSpec
pub fn new(global: OwnedGlobal, export_names: Vec<String>) -> Self
Sourcepub fn new_def(init_val: i64, export_names: Vec<String>) -> Self
pub fn new_def(init_val: i64, export_names: Vec<String>) -> Self
Create a new global definition with an initial value and export names.
Sourcepub fn new_import(
module: String,
field: String,
export_names: Vec<String>,
) -> Self
pub fn new_import( module: String, field: String, export_names: Vec<String>, ) -> Self
Create a new global import definition with a module and field name, and export names.
Sourcepub fn to_ref<'a>(&'a self) -> GlobalSpec<'a>
pub fn to_ref<'a>(&'a self) -> GlobalSpec<'a>
Create a GlobalSpec backed by the values in this
OwnedGlobalSpec.
Auto Trait Implementations§
impl Freeze for OwnedGlobalSpec
impl RefUnwindSafe for OwnedGlobalSpec
impl Send for OwnedGlobalSpec
impl Sync for OwnedGlobalSpec
impl Unpin for OwnedGlobalSpec
impl UnwindSafe for OwnedGlobalSpec
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