pub struct GlobalVariable {
pub name: String,
pub ty: TypeId,
pub initializer: Option<ConstId>,
pub is_constant: bool,
pub linkage: Linkage,
}Expand description
A global variable definition.
Fields§
§name: StringPublic API for name.
ty: TypeIdType of the value stored (not the pointer type).
initializer: Option<ConstId>Optional constant initializer.
is_constant: boolIf true, the global is read-only.
linkage: LinkagePublic API for linkage.
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 (const: unstable) · 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 UnsafeUnpin 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