pub trait ReadableVecExt<T>: Readable<Target = Vec<T>> {
// Provided methods
fn len(&self) -> usize
where T: 'static { ... }
fn is_empty(&self) -> bool
where T: 'static { ... }
fn first(&self) -> Option<<Self::Storage as AnyStorage>::Ref<'_, T>>
where T: 'static { ... }
fn last(&self) -> Option<<Self::Storage as AnyStorage>::Ref<'_, T>>
where T: 'static { ... }
fn get(
&self,
index: usize,
) -> Option<<Self::Storage as AnyStorage>::Ref<'_, T>>
where T: 'static { ... }
fn iter(&self) -> ReadableValueIterator<'_, Self> ⓘ
where Self: Sized { ... }
}Available on crate feature
prelude only.Expand description
An extension trait for Readable<Vec<T>> that provides some convenience methods.
Provided Methods§
Sourcefn first(&self) -> Option<<Self::Storage as AnyStorage>::Ref<'_, T>>where
T: 'static,
fn first(&self) -> Option<<Self::Storage as AnyStorage>::Ref<'_, T>>where
T: 'static,
Get the first element of the inner vector.
Sourcefn last(&self) -> Option<<Self::Storage as AnyStorage>::Ref<'_, T>>where
T: 'static,
fn last(&self) -> Option<<Self::Storage as AnyStorage>::Ref<'_, T>>where
T: 'static,
Get the last element of the inner vector.
Sourcefn get(&self, index: usize) -> Option<<Self::Storage as AnyStorage>::Ref<'_, T>>where
T: 'static,
fn get(&self, index: usize) -> Option<<Self::Storage as AnyStorage>::Ref<'_, T>>where
T: 'static,
Get the element at the given index of the inner vector.
Sourcefn iter(&self) -> ReadableValueIterator<'_, Self> ⓘwhere
Self: Sized,
fn iter(&self) -> ReadableValueIterator<'_, Self> ⓘwhere
Self: Sized,
Get an iterator over the values of the inner vector.