pub enum Value {
Absent,
Str(String),
Int(i128),
Float(Float),
Decimal(Decimal),
Bool(bool),
List(Vec<Value>),
Set(Vec<Value>),
Map(Vec<(Value, Value)>),
Pair {
by: String,
value: Box<Value>,
},
}Expand description
A state value (SPEC-019 R.3).
Variants§
Absent
Str(String)
Int(i128)
Float(Float)
Decimal(Decimal)
Bool(bool)
List(Vec<Value>)
A scalar list as a field value (never sorted; it is data).
Set(Vec<Value>)
A set: distinct elements sorted by rendering.
Map(Vec<(Value, Value)>)
A map: distinct keys sorted by rendering.
Pair
A contribution of events: who supplied a value.
Implementations§
Source§impl Value
impl Value
Sourcepub fn fault_evidence(&self) -> Option<Vec<String>>
pub fn fault_evidence(&self) -> Option<Vec<String>>
Evidence of a kernel fault. Installed scalar-map types cannot mimic the mixed scalar/list structure of this marker.
Sourcepub fn from_sexpr(s: &SExpr) -> Value
pub fn from_sexpr(s: &SExpr) -> Value
Convert a field value. Symbols and keywords, which typing forbids on state-bearing fields, render as their text so the fold stays total.
pub fn as_int(&self) -> Option<i128>
Trait Implementations§
impl Eq for Value
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 Valuewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<(Value, Value)>: UnsafeUnpin,
*const Value is !null: UnsafeUnpin,
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