pub struct GlobalVariable {Show 16 fields
pub id: Option<GlobalIdx>,
pub name: String,
pub ty: TypeIdx,
pub initializer: Option<ConstValue>,
pub linkage: Option<Linkage>,
pub visibility: Option<Visibility>,
pub dll_storage: Option<DllStorageClass>,
pub thread_local: Option<ThreadLocalStorageModel>,
pub unnamed_addr: bool,
pub local_unnamed_addr: bool,
pub addr_space: Option<u32>,
pub externally_initialized: bool,
pub is_constant: bool,
pub section: Option<String>,
pub align: Option<u32>,
pub location: Location,
}Expand description
A global variable in the module.
Fields§
§id: Option<GlobalIdx>§name: String§ty: TypeIdx§initializer: Option<ConstValue>§linkage: Option<Linkage>§visibility: Option<Visibility>§dll_storage: Option<DllStorageClass>§thread_local: Option<ThreadLocalStorageModel>§unnamed_addr: bool§local_unnamed_addr: bool§addr_space: Option<u32>§externally_initialized: bool§is_constant: boolIf true, this is a constant (immutable).
section: Option<String>§align: Option<u32>§location: LocationImplementations§
Trait Implementations§
Source§impl Clone for GlobalVariable
impl Clone for GlobalVariable
Source§fn clone(&self) -> GlobalVariable
fn clone(&self) -> GlobalVariable
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GlobalVariable
impl RefUnwindSafe for GlobalVariable
impl Send for GlobalVariable
impl Sync for GlobalVariable
impl Unpin for GlobalVariable
impl UnwindSafe for GlobalVariable
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