ValueRefMut

Enum ValueRefMut 

Source
pub enum ValueRefMut<'a> {
    Float(&'a mut f64),
    Int(&'a mut i64),
    Bool(&'a mut bool),
    String(&'a mut Str),
    Map(&'a mut Map),
    Array(&'a mut Array),
    None,
}
Expand description

A mutable borrowed reference to a Value.

This enum provides write‑access to the data stored inside a Value via mutable references (&'a mut …). It mirrors the variants of Value but allows the underlying data to be modified in place.

§Variants

  • Float(&'a mut f64) – Mutable reference to a floating‑point number.
  • Int(&'a mut i64) – Mutable reference to an integer.
  • Bool(&'a mut bool) – Mutable reference to a boolean.
  • String(&'a mut Str) – Mutable reference to a string.
  • Map(&'a mut Map) – Mutable reference to a map container.
  • Array(&'a mut Array) – Mutable reference to an array container.
  • None – Represents the absence of a value.

Variants§

§

Float(&'a mut f64)

Mutable reference to a floating‑point number.

§

Int(&'a mut i64)

Mutable reference to an integer.

§

Bool(&'a mut bool)

Mutable reference to a boolean.

§

String(&'a mut Str)

Mutable reference to a string.

§

Map(&'a mut Map)

Mutable reference to a map.

§

Array(&'a mut Array)

Mutable reference to an array.

§

None

No value.

Trait Implementations§

Source§

impl<'a> Debug for ValueRefMut<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for ValueRefMut<'a>

§

impl<'a> RefUnwindSafe for ValueRefMut<'a>

§

impl<'a> Send for ValueRefMut<'a>

§

impl<'a> Sync for ValueRefMut<'a>

§

impl<'a> Unpin for ValueRefMut<'a>

§

impl<'a> !UnwindSafe for ValueRefMut<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.