pub trait ReadableVecExt<T>: Readable<Vec<T>>where
    T: 'static,{
    // Provided methods
    fn len(&self) -> usize { ... }
    fn is_empty(&self) -> bool { ... }
    fn first(&self) -> Option<Self::Ref<T>> { ... }
    fn last(&self) -> Option<Self::Ref<T>> { ... }
    fn get(&self, index: usize) -> Option<Self::Ref<T>> { ... }
    fn iter(&self) -> ReadableValueIterator<'_, T, Self> 
       where Self: Sized { ... }
}
Expand description

An extension trait for Readable<Vec> that provides some convenience methods.

Provided Methods§

fn len(&self) -> usize

Returns the length of the inner vector.

fn is_empty(&self) -> bool

Returns true if the inner vector is empty.

fn first(&self) -> Option<Self::Ref<T>>

Get the first element of the inner vector.

fn last(&self) -> Option<Self::Ref<T>>

Get the last element of the inner vector.

fn get(&self, index: usize) -> Option<Self::Ref<T>>

Get the element at the given index of the inner vector.

fn iter(&self) -> ReadableValueIterator<'_, T, Self> where Self: Sized,

Get an iterator over the values of the inner vector.

Object Safety§

This trait is not object safe.

Implementors§

§

impl<T, R> ReadableVecExt<T> for Rwhere T: 'static, R: Readable<Vec<T>>,