pub enum Literal {
Null,
Integer(i64),
Float(f64),
Boolean(bool),
String(String),
Date(String),
Time(String),
Timestamp(String),
}Variants
Null
Integer(i64)
Float(f64)
Boolean(bool)
String(String)
Date(String)
Time(String)
Timestamp(String)
Implementations
sourceimpl Literal
impl Literal
sourcepub fn as_integer_mut(&mut self) -> Option<&mut i64>
pub fn as_integer_mut(&mut self) -> Option<&mut i64>
Optionally returns mutable references to the inner fields if this is a Literal::Integer, otherwise None
sourcepub fn as_integer(&self) -> Option<&i64>
pub fn as_integer(&self) -> Option<&i64>
Optionally returns references to the inner fields if this is a Literal::Integer, otherwise None
sourcepub fn into_integer(self) -> Result<i64, Self>
pub fn into_integer(self) -> Result<i64, Self>
Returns the inner fields if this is a Literal::Integer, otherwise returns back the enum in the Err case of the result
sourcepub fn as_float_mut(&mut self) -> Option<&mut f64>
pub fn as_float_mut(&mut self) -> Option<&mut f64>
Optionally returns mutable references to the inner fields if this is a Literal::Float, otherwise None
sourcepub fn as_float(&self) -> Option<&f64>
pub fn as_float(&self) -> Option<&f64>
Optionally returns references to the inner fields if this is a Literal::Float, otherwise None
sourcepub fn into_float(self) -> Result<f64, Self>
pub fn into_float(self) -> Result<f64, Self>
Returns the inner fields if this is a Literal::Float, otherwise returns back the enum in the Err case of the result
sourcepub fn as_boolean_mut(&mut self) -> Option<&mut bool>
pub fn as_boolean_mut(&mut self) -> Option<&mut bool>
Optionally returns mutable references to the inner fields if this is a Literal::Boolean, otherwise None
sourcepub fn as_boolean(&self) -> Option<&bool>
pub fn as_boolean(&self) -> Option<&bool>
Optionally returns references to the inner fields if this is a Literal::Boolean, otherwise None
sourcepub fn into_boolean(self) -> Result<bool, Self>
pub fn into_boolean(self) -> Result<bool, Self>
Returns the inner fields if this is a Literal::Boolean, otherwise returns back the enum in the Err case of the result
sourcepub fn as_string_mut(&mut self) -> Option<&mut String>
pub fn as_string_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a Literal::String, otherwise None
sourcepub fn as_string(&self) -> Option<&String>
pub fn as_string(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a Literal::String, otherwise None
sourcepub fn into_string(self) -> Result<String, Self>
pub fn into_string(self) -> Result<String, Self>
Returns the inner fields if this is a Literal::String, otherwise returns back the enum in the Err case of the result
sourcepub fn as_date_mut(&mut self) -> Option<&mut String>
pub fn as_date_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a Literal::Date, otherwise None
sourcepub fn as_date(&self) -> Option<&String>
pub fn as_date(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a Literal::Date, otherwise None
sourcepub fn into_date(self) -> Result<String, Self>
pub fn into_date(self) -> Result<String, Self>
Returns the inner fields if this is a Literal::Date, otherwise returns back the enum in the Err case of the result
sourcepub fn as_time_mut(&mut self) -> Option<&mut String>
pub fn as_time_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a Literal::Time, otherwise None
sourcepub fn as_time(&self) -> Option<&String>
pub fn as_time(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a Literal::Time, otherwise None
sourcepub fn into_time(self) -> Result<String, Self>
pub fn into_time(self) -> Result<String, Self>
Returns the inner fields if this is a Literal::Time, otherwise returns back the enum in the Err case of the result
sourcepub fn as_timestamp_mut(&mut self) -> Option<&mut String>
pub fn as_timestamp_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a Literal::Timestamp, otherwise None
sourcepub fn as_timestamp(&self) -> Option<&String>
pub fn as_timestamp(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a Literal::Timestamp, otherwise None
sourcepub fn into_timestamp(self) -> Result<String, Self>
pub fn into_timestamp(self) -> Result<String, Self>
Returns the inner fields if this is a Literal::Timestamp, otherwise returns back the enum in the Err case of the result
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Literal
impl<'de> Deserialize<'de> for Literal
sourcefn 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 StructuralPartialEq for Literal
Auto Trait Implementations
impl RefUnwindSafe for Literal
impl Send for Literal
impl Sync for Literal
impl Unpin for Literal
impl UnwindSafe for Literal
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more