simd_json::prelude

Trait ArrayTrait

Source
pub trait ArrayTrait {
    type Element;

    // Required methods
    fn iter<'i>(&'i self) -> Box<dyn Iterator<Item = &'i Self::Element> + 'i>;
    fn len(&self) -> usize;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

A trait for the minimal common functionality of a vale array

Required Associated Types§

Source

type Element

Elements of the array

Required Methods§

Source

fn iter<'i>(&'i self) -> Box<dyn Iterator<Item = &'i Self::Element> + 'i>

Iterates over the values paris

Source

fn len(&self) -> usize

Number of key/value pairs

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns if the array is empty

Implementations on Foreign Types§

Source§

impl<T> Array for Vec<T>

Source§

type Element = T

Source§

fn iter<'i>(&'i self) -> Box<dyn Iterator<Item = &'i T> + 'i>

Source§

fn len(&self) -> usize

Implementors§