[][src]Trait geen::StorageExt

pub trait StorageExt {
    type Value;
    fn truncate(&mut self, _len: usize) -> Result<(), GeneError>;
fn shift(&mut self, n: usize) -> Result<(), GeneError>;
fn for_each<F>(&self, f: F) -> Result<(), GeneError>
    where
        F: FnMut(Result<Self::Value, GeneError>)
; }

Associated Types

type Value

Loading content...

Required methods

fn truncate(&mut self, _len: usize) -> Result<(), GeneError>

Shortens the array, keeping the first len elements and dropping the rest.

fn shift(&mut self, n: usize) -> Result<(), GeneError>

Shift the array, by discarding the first n elements from the front.

fn for_each<F>(&self, f: F) -> Result<(), GeneError> where
    F: FnMut(Result<Self::Value, GeneError>), 

Execute the given closure for each value in the array

Loading content...

Implementations on Foreign Types

impl<T: Clone> StorageExt for Vec<T>[src]

type Value = T

Loading content...

Implementors

Loading content...