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