Skip to main content

Array

Trait Array 

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

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

    // Provided method
    fn is_unique(&self) -> bool { ... }
}

Required Associated Types§

Source

type Node: Node<'a, F>

Source

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

Required Methods§

Source

fn len(&self) -> usize

Source

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

Provided Methods§

Source

fn is_unique(&self) -> bool

uniqueItems: every element distinct under JSON equality.

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> Array<'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§