pub enum Llsd {
Undefined,
Boolean(bool),
Integer(i32),
Real(f64),
String(String),
Uri(Uri),
Uuid(Uuid),
Date(DateTime<Utc>),
Binary(Vec<u8>),
Array(Vec<Llsd>),
Map(HashMap<String, Llsd>),
}Variants§
Undefined
Boolean(bool)
Integer(i32)
Real(f64)
String(String)
Uri(Uri)
Uuid(Uuid)
Date(DateTime<Utc>)
Binary(Vec<u8>)
Array(Vec<Llsd>)
Map(HashMap<String, Llsd>)
Implementations§
Source§impl Llsd
impl Llsd
Sourcepub fn is_undefined(&self) -> bool
pub fn is_undefined(&self) -> bool
Returns true if this is a Llsd::Undefined, otherwise false
Sourcepub fn is_boolean(&self) -> bool
pub fn is_boolean(&self) -> bool
Returns true if this is a Llsd::Boolean, otherwise false
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 Llsd::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 Llsd::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 Llsd::Boolean, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Returns true if this is a Llsd::Integer, otherwise false
Sourcepub fn as_integer_mut(&mut self) -> Option<&mut i32>
pub fn as_integer_mut(&mut self) -> Option<&mut i32>
Optionally returns mutable references to the inner fields if this is a Llsd::Integer, otherwise None
Sourcepub fn as_integer(&self) -> Option<&i32>
pub fn as_integer(&self) -> Option<&i32>
Optionally returns references to the inner fields if this is a Llsd::Integer, otherwise None
Sourcepub fn into_integer(self) -> Result<i32, Self>
pub fn into_integer(self) -> Result<i32, Self>
Returns the inner fields if this is a Llsd::Integer, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_real_mut(&mut self) -> Option<&mut f64>
pub fn as_real_mut(&mut self) -> Option<&mut f64>
Optionally returns mutable references to the inner fields if this is a Llsd::Real, otherwise None
Sourcepub fn as_real(&self) -> Option<&f64>
pub fn as_real(&self) -> Option<&f64>
Optionally returns references to the inner fields if this is a Llsd::Real, otherwise None
Sourcepub fn into_real(self) -> Result<f64, Self>
pub fn into_real(self) -> Result<f64, Self>
Returns the inner fields if this is a Llsd::Real, 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 Llsd::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 Llsd::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 Llsd::String, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_uri_mut(&mut self) -> Option<&mut Uri>
pub fn as_uri_mut(&mut self) -> Option<&mut Uri>
Optionally returns mutable references to the inner fields if this is a Llsd::Uri, otherwise None
Sourcepub fn as_uri(&self) -> Option<&Uri>
pub fn as_uri(&self) -> Option<&Uri>
Optionally returns references to the inner fields if this is a Llsd::Uri, otherwise None
Sourcepub fn into_uri(self) -> Result<Uri, Self>
pub fn into_uri(self) -> Result<Uri, Self>
Returns the inner fields if this is a Llsd::Uri, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_uuid_mut(&mut self) -> Option<&mut Uuid>
pub fn as_uuid_mut(&mut self) -> Option<&mut Uuid>
Optionally returns mutable references to the inner fields if this is a Llsd::Uuid, otherwise None
Sourcepub fn as_uuid(&self) -> Option<&Uuid>
pub fn as_uuid(&self) -> Option<&Uuid>
Optionally returns references to the inner fields if this is a Llsd::Uuid, otherwise None
Sourcepub fn into_uuid(self) -> Result<Uuid, Self>
pub fn into_uuid(self) -> Result<Uuid, Self>
Returns the inner fields if this is a Llsd::Uuid, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_date_mut(&mut self) -> Option<&mut DateTime<Utc>>
pub fn as_date_mut(&mut self) -> Option<&mut DateTime<Utc>>
Optionally returns mutable references to the inner fields if this is a Llsd::Date, otherwise None
Sourcepub fn as_date(&self) -> Option<&DateTime<Utc>>
pub fn as_date(&self) -> Option<&DateTime<Utc>>
Optionally returns references to the inner fields if this is a Llsd::Date, otherwise None
Sourcepub fn into_date(self) -> Result<DateTime<Utc>, Self>
pub fn into_date(self) -> Result<DateTime<Utc>, Self>
Returns the inner fields if this is a Llsd::Date, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_binary_mut(&mut self) -> Option<&mut Vec<u8>>
pub fn as_binary_mut(&mut self) -> Option<&mut Vec<u8>>
Optionally returns mutable references to the inner fields if this is a Llsd::Binary, otherwise None
Sourcepub fn as_binary(&self) -> Option<&Vec<u8>>
pub fn as_binary(&self) -> Option<&Vec<u8>>
Optionally returns references to the inner fields if this is a Llsd::Binary, otherwise None
Sourcepub fn into_binary(self) -> Result<Vec<u8>, Self>
pub fn into_binary(self) -> Result<Vec<u8>, Self>
Returns the inner fields if this is a Llsd::Binary, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_array_mut(&mut self) -> Option<&mut Vec<Llsd>>
pub fn as_array_mut(&mut self) -> Option<&mut Vec<Llsd>>
Optionally returns mutable references to the inner fields if this is a Llsd::Array, otherwise None
Sourcepub fn as_array(&self) -> Option<&Vec<Llsd>>
pub fn as_array(&self) -> Option<&Vec<Llsd>>
Optionally returns references to the inner fields if this is a Llsd::Array, otherwise None
Sourcepub fn into_array(self) -> Result<Vec<Llsd>, Self>
pub fn into_array(self) -> Result<Vec<Llsd>, Self>
Returns the inner fields if this is a Llsd::Array, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_map_mut(&mut self) -> Option<&mut HashMap<String, Llsd>>
pub fn as_map_mut(&mut self) -> Option<&mut HashMap<String, Llsd>>
Optionally returns mutable references to the inner fields if this is a Llsd::Map, otherwise None