pub enum DataValue {
Boolean(bool),
Integer(i64),
}Expand description
The value of a data entry.
Variants§
Implementations§
Source§impl DataValue
impl DataValue
Sourcepub fn unwrap_boolean(&self) -> bool
pub fn unwrap_boolean(&self) -> bool
Unwrap the contained value if it is a DataValue::Boolean. If the value is not a DataValue::Boolean, this method panics.
Sourcepub fn unwrap_integer(&self) -> i64
pub fn unwrap_integer(&self) -> i64
Unwrap the contained value if it is a DataValue::Integer. If the value is not a DataValue::Integer, this method panics.
Sourcepub fn boolean(&self) -> Option<bool>
pub fn boolean(&self) -> Option<bool>
Get the contained value if it is a DataValue::Boolean. If the value is not a DataValue::Boolean, None is returned.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DataValue
impl<'de> Deserialize<'de> for DataValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for DataValue
Auto Trait Implementations§
impl Freeze for DataValue
impl RefUnwindSafe for DataValue
impl Send for DataValue
impl Sync for DataValue
impl Unpin for DataValue
impl UnwindSafe for DataValue
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