Skip to main content

ValueIndex

Trait ValueIndex 

Source
pub trait ValueIndex: Sealed {
    // Required methods
    fn index_into(self, value: &Value) -> Option<&Value>;
    fn index_into_mut(self, value: &mut Value) -> Option<&mut Value>;
}
Expand description

Index accepted by Value::get and Value::get_mut.

Required Methods§

Source

fn index_into(self, value: &Value) -> Option<&Value>

Source

fn index_into_mut(self, value: &mut Value) -> Option<&mut Value>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ValueIndex for &String

Source§

fn index_into(self, value: &Value) -> Option<&Value>

Source§

fn index_into_mut(self, value: &mut Value) -> Option<&mut Value>

Source§

impl ValueIndex for &str

Source§

fn index_into(self, value: &Value) -> Option<&Value>

Source§

fn index_into_mut(self, value: &mut Value) -> Option<&mut Value>

Source§

impl ValueIndex for String

Source§

fn index_into(self, value: &Value) -> Option<&Value>

Source§

fn index_into_mut(self, value: &mut Value) -> Option<&mut Value>

Source§

impl ValueIndex for usize

Source§

fn index_into(self, value: &Value) -> Option<&Value>

Source§

fn index_into_mut(self, value: &mut Value) -> Option<&mut Value>

Implementors§