pub enum Value {
Null,
Bool(bool),
Int(i64),
Float(f64),
String(String),
Json(Value),
Bytes(Vec<u8>),
}Expand description
A literal value.
Supports primitives (null, bool, int, float, string), structured JSON data (arrays and objects), and binary blob references.
Variants§
Null
Bool(bool)
Int(i64)
Float(f64)
String(String)
Json(Value)
Structured JSON data (arrays, objects, nested structures).
Use jq to query/extract values.
Bytes(Vec<u8>)
Inline binary data — the shell’s single binary value. Carries the bytes
themselves (keys, a file header, a random draw, a dd block), pipe-native
since the pipe is already a byte buffer. Serializes as the base64 envelope
from crate::bytes. Persisting large binary is a separate VFS concern
(plain files under /v/blobs), not a Value. See docs/binary-data.md.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Value, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Value, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for Value
impl Serialize for Value
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
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