Skip to main content

JsonArrayAccess

Trait JsonArrayAccess 

Source
pub trait JsonArrayAccess<'a, F: Json> {
    type Node: JsonNode<'a, F>;
    type ElementsIter: Iterator<Item = Self::Node>;

    // Required methods
    fn len(&self) -> usize;
    fn elements(&self) -> Self::ElementsIter;
    fn is_unique(&self) -> bool;
}

Required Associated Types§

Source

type Node: JsonNode<'a, F>

Source

type ElementsIter: Iterator<Item = Self::Node>

Required Methods§

Source

fn len(&self) -> usize

Source

fn elements(&self) -> Self::ElementsIter

Source

fn is_unique(&self) -> bool

Whether every element is distinct under JSON equality (uniqueItems).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<'a> JsonArrayAccess<'a, SerdeJson> for &'a [Value]

Source§

type Node = &'a Value

Source§

type ElementsIter = Iter<'a, Value>

Source§

fn len(&self) -> usize

Source§

fn elements(&self) -> Iter<'a, Value>

Source§

fn is_unique(&self) -> bool

Implementors§