pub enum GlobalDefKind {
Scalar {
etype: ExprType,
initial_value: Option<ConstantDatum>,
},
Array {
subtype: ExprType,
dimensions: Vec<usize>,
},
}Expand description
Kind of a pre-defined global variable.
Variants§
Scalar
A scalar (non-array) variable.
Fields
§
initial_value: Option<ConstantDatum>Initial value for the variable. If None, the variable is initialized to its default
value: 0 for numeric types and an empty string for Text. The type of the datum
must match etype.
Array
A multidimensional array with the given element type and fixed dimension sizes.
Each dimension size must be positive and must fit in a u16.
Trait Implementations§
Source§impl Clone for GlobalDefKind
impl Clone for GlobalDefKind
Source§fn clone(&self) -> GlobalDefKind
fn clone(&self) -> GlobalDefKind
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 GlobalDefKind
impl RefUnwindSafe for GlobalDefKind
impl Send for GlobalDefKind
impl Sync for GlobalDefKind
impl Unpin for GlobalDefKind
impl UnsafeUnpin for GlobalDefKind
impl UnwindSafe for GlobalDefKind
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