Enum brevdash_data::DataValue [−][src]
The value of a data entry.
Variants
Boolean(bool)
A boolean value.
Integer(i64)
An integer value.
Implementations
impl DataValue
[src]
pub fn unwrap_boolean(&self) -> bool
[src]
Unwrap the contained value if it is a DataValue::Boolean. If the value is not a DataValue::Boolean, this method panics.
pub fn unwrap_integer(&self) -> i64
[src]
Unwrap the contained value if it is a DataValue::Integer. If the value is not a DataValue::Integer, this method panics.
pub fn boolean(&self) -> Option<bool>
[src]
Get the contained value if it is a DataValue::Boolean. If the value is not a DataValue::Boolean, None is returned.
pub fn integer(&self) -> Option<i64>
[src]
Get the contained value if it is a DataValue::Integer. If the value is not a DataValue::Integer, None is returned.
pub fn datatype(&self) -> DataType
[src]
Get the type of the data value.
Trait Implementations
impl Clone for DataValue
[src]
impl Copy for DataValue
[src]
impl Debug for DataValue
[src]
impl<'de> Deserialize<'de> for DataValue
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl FromStr for DataValue
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Serialize for DataValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for DataValue
impl Send for DataValue
impl Sync for DataValue
impl Unpin for DataValue
impl UnwindSafe for DataValue
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,