pub enum FieldValue {
Int(i32),
Float(f32),
String(String),
}Expand description
A value that can be stored in a JMap field
Variants§
Int(i32)
Integer value (for Long, UnsignedLong, Short, Char)
Float(f32)
Floating point value
String(String)
String value (for String or StringOffset)
Implementations§
Source§impl FieldValue
impl FieldValue
Sourcepub fn default_for(field_type: FieldType) -> Self
pub fn default_for(field_type: FieldType) -> Self
Get the default value for a field type
Sourcepub fn is_compatible_with(&self, field_type: FieldType) -> bool
pub fn is_compatible_with(&self, field_type: FieldType) -> bool
Check if this value is compatible with a field type
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 · 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 Display for FieldValue
impl Display for FieldValue
Source§impl From<&str> for FieldValue
impl From<&str> for FieldValue
Source§impl From<String> for FieldValue
impl From<String> for FieldValue
Source§impl From<f32> for FieldValue
impl From<f32> for FieldValue
Source§impl From<i32> for FieldValue
impl From<i32> 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 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