pub enum FieldValue {
Bool(bool),
Int(i64),
Float(f64),
Text(String),
}Expand description
A neutral, typed value for a single GlobalMemory field.
This is the lingua franca for generic GM field access (GmAccess): it
lets tooling read/write GM fields by name or id without knowing the concrete
generated struct. Values are widened to the broadest type per category (all
integer widths as i64, all floats as f64).
Variants§
Bool(bool)
A boolean field.
Int(i64)
Any integer field, widened to i64.
Float(f64)
Any float field, widened to f64.
Text(String)
A fixed-string field, as an owned String.
Implementations§
Source§impl FieldValue
impl FieldValue
Trait Implementations§
Source§impl Clone for FieldValue
impl Clone for FieldValue
Source§fn clone(&self) -> FieldValue
fn clone(&self) -> FieldValue
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 moreSource§impl Debug for FieldValue
impl Debug for FieldValue
Source§impl PartialEq for FieldValue
impl PartialEq for FieldValue
impl StructuralPartialEq for FieldValue
Auto Trait Implementations§
impl Freeze for FieldValue
impl RefUnwindSafe for FieldValue
impl Send for FieldValue
impl Sync for FieldValue
impl Unpin for FieldValue
impl UnsafeUnpin for FieldValue
impl UnwindSafe for FieldValue
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