Trait JsonMaybeArray

Source
pub trait JsonMaybeArray: JsonValueWrap
where Self: Sized,
{ // Required methods fn get_index(&self, index: usize) -> Option<&Self>; fn mut_index(&mut self, index: usize) -> Option<&mut Self>; }
Expand description

Treat json value as array and get data from it according to index

Required Methods§

Source

fn get_index(&self, index: usize) -> Option<&Self>

Source

fn mut_index(&mut self, index: usize) -> Option<&mut Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl JsonMaybeArray for Value

Source§

fn get_index(&self, index: usize) -> Option<&Self>

Source§

fn mut_index(&mut self, index: usize) -> Option<&mut Self>

Implementors§