pub enum LLSDValue {
Undefined,
Boolean(bool),
Real(f64),
Integer(i32),
UUID(Uuid),
String(String),
Date(i64),
URI(String),
Binary(Vec<u8>),
Map(HashMap<String, LLSDValue>),
Array(Vec<LLSDValue>),
}Expand description
The primitive LLSD data item. Serialization takes a tree of these. Deserialization returns a tree of these.
Variants§
Undefined
Not convertable.
Boolean(bool)
Boolean
Real(f64)
Real, always 64-bit.
Integer(i32)
Integer, always 32 bit, for historical reasons.
UUID(Uuid)
UUID, as a binary 128 bit value.
String(String)
String, UTF-8.
Date(i64)
Date, as seconds relative to the UNIX epoch, January 1, 1970.
URI(String)
Universal Resource Identifier
Binary(Vec<u8>)
Array of bytes.
Map(HashMap<String, LLSDValue>)
Key/value set of more LLSDValue items.
Array(Vec<LLSDValue>)
Array of more LLSDValue items.
Implementations§
Source§impl LLSDValue
impl LLSDValue
Sourcepub fn is_undefined(&self) -> bool
pub fn is_undefined(&self) -> bool
Returns true if this is a LLSDValue::Undefined, 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 LLSDValue::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 LLSDValue::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 LLSDValue::Boolean, 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 LLSDValue::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 LLSDValue::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 LLSDValue::Real, otherwise returns back the enum in the Err case of the result
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 LLSDValue::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 LLSDValue::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 LLSDValue::Integer, 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 LLSDValue::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 LLSDValue::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 LLSDValue::UUID, 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 LLSDValue::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 LLSDValue::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 LLSDValue::String, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_date_mut(&mut self) -> Option<&mut i64>
pub fn as_date_mut(&mut self) -> Option<&mut i64>
Optionally returns mutable references to the inner fields if this is a LLSDValue::Date, otherwise None
Sourcepub fn as_date(&self) -> Option<&i64>
pub fn as_date(&self) -> Option<&i64>
Optionally returns references to the inner fields if this is a LLSDValue::Date, otherwise None
Sourcepub fn into_date(self) -> Result<i64, Self>
pub fn into_date(self) -> Result<i64, Self>
Returns the inner fields if this is a LLSDValue::Date, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_uri_mut(&mut self) -> Option<&mut String>
pub fn as_uri_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a LLSDValue::URI, otherwise None
Sourcepub fn as_uri(&self) -> Option<&String>
pub fn as_uri(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a LLSDValue::URI, otherwise None
Sourcepub fn into_uri(self) -> Result<String, Self>
pub fn into_uri(self) -> Result<String, Self>
Returns the inner fields if this is a LLSDValue::URI, 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 LLSDValue::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 LLSDValue::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 LLSDValue::Binary, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_map_mut(&mut self) -> Option<&mut HashMap<String, LLSDValue>>
pub fn as_map_mut(&mut self) -> Option<&mut HashMap<String, LLSDValue>>
Optionally returns mutable references to the inner fields if this is a LLSDValue::Map, otherwise None
Sourcepub fn as_map(&self) -> Option<&HashMap<String, LLSDValue>>
pub fn as_map(&self) -> Option<&HashMap<String, LLSDValue>>
Optionally returns references to the inner fields if this is a LLSDValue::Map, otherwise None
Sourcepub fn into_map(self) -> Result<HashMap<String, LLSDValue>, Self>
pub fn into_map(self) -> Result<HashMap<String, LLSDValue>, Self>
Returns the inner fields if this is a LLSDValue::Map, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_array_mut(&mut self) -> Option<&mut Vec<LLSDValue>>
pub fn as_array_mut(&mut self) -> Option<&mut Vec<LLSDValue>>
Optionally returns mutable references to the inner fields if this is a LLSDValue::Array, otherwise None
Sourcepub fn as_array(&self) -> Option<&Vec<LLSDValue>>
pub fn as_array(&self) -> Option<&Vec<LLSDValue>>
Optionally returns references to the inner fields if this is a LLSDValue::Array, otherwise None
Sourcepub fn into_array(self) -> Result<Vec<LLSDValue>, Self>
pub fn into_array(self) -> Result<Vec<LLSDValue>, Self>
Returns the inner fields if this is a LLSDValue::Array, otherwise returns back the enum in the Err case of the result