pub enum ValueRef<'a> {
Float(&'a f64),
Int(&'a i64),
Bool(&'a bool),
String(&'a Str),
Map(&'a Map),
Array(&'a Array),
None,
}Expand description
A borrowed reference to a Value.
This enum provides read‑only access to the data stored inside a Value
without taking ownership. It mirrors the variants of Value but holds
references (&'a …) to the underlying data, allowing inspection while
preserving the original lifetime.
§Variants
Float(&'a f64)– Reference to a 64‑bit floating‑point number.Int(&'a i64)– Reference to a signed 64‑bit integer.Bool(&'a bool)– Reference to a boolean value.String(&'a Str)– Reference to a string (Str) value.Map(&'a Map)– Reference to a map container.Array(&'a Array)– Reference to an array container.None– Represents the absence of a value.
Variants§
Float(&'a f64)
Reference to a floating‑point number.
Int(&'a i64)
Reference to an integer.
Bool(&'a bool)
Reference to a boolean.
String(&'a Str)
Reference to a string.
Map(&'a Map)
Reference to a map.
Array(&'a Array)
Reference to an array.
None
No value.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ValueRef<'a>
impl<'a> RefUnwindSafe for ValueRef<'a>
impl<'a> Send for ValueRef<'a>
impl<'a> Sync for ValueRef<'a>
impl<'a> Unpin for ValueRef<'a>
impl<'a> UnwindSafe for ValueRef<'a>
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