pub enum Value {
Null,
Bool(bool),
Int(i64),
Float(f64),
Text(String),
List(Vec<Value>),
Map(BTreeMap<String, Value>),
Secret,
Module(Vec<u8>),
Path(String),
}Expand description
A value crossing the RPC boundary.
Variants§
Null
Absent value.
Bool(bool)
Boolean.
Int(i64)
Integer.
Float(f64)
Floating-point number.
Text(String)
UTF-8 text.
List(Vec<Value>)
Ordered list.
Map(BTreeMap<String, Value>)
Key-sorted map (deterministic wire order).
Secret
Redaction marker: a secret existed here. Never carries content.
Module(Vec<u8>)
A serialized Active Infinity module.
Path(String)
A dotted path inside a module.
Implementations§
Source§impl Value
impl Value
Sourcepub fn list(items: impl IntoIterator<Item = Value>) -> Value
pub fn list(items: impl IntoIterator<Item = Value>) -> Value
Convenience constructor for a list.
Sourcepub fn map<K: Into<String>, I: IntoIterator<Item = (K, Value)>>(
entries: I,
) -> Value
pub fn map<K: Into<String>, I: IntoIterator<Item = (K, Value)>>( entries: I, ) -> Value
Convenience constructor for a map (keys sorted on construction).
Sourcepub fn wire_size(&self) -> u64
pub fn wire_size(&self) -> u64
Bytes this value occupies on the wire (upper bound; used for budgets).
Sourcepub fn is_tainted(&self) -> bool
pub fn is_tainted(&self) -> bool
True when this value or any descendant is a secret marker.
Trait Implementations§
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze 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