pub enum Value {
Null,
Bool(bool),
Int(i64),
Float(f64),
Str(String),
List(Vec<Value>),
}Expand description
Attribute value used by ABAC conditions.
Variants§
Implementations§
Source§impl Value
impl Value
Sourcepub fn compare(&self, other: &Value) -> Option<Ordering>
pub fn compare(&self, other: &Value) -> Option<Ordering>
Ordering between comparable values. Integers and floats compare with each other; other mixed types have no ordering.
Sourcepub fn loosely_eq(&self, other: &Value) -> bool
pub fn loosely_eq(&self, other: &Value) -> bool
Equality that treats Int(1) and Float(1.0) as equal.
pub fn as_str(&self) -> Option<&str>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
Source§fn 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 Value
Auto Trait Implementations§
impl Forget for Value
impl Freeze for Value
impl Move for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more