simd_json::value::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§