MutList

Trait MutList 

Source
pub trait MutList<T: Value>: ImmList<T> {
    // Required methods
    fn validate_push(current_len: usize) -> Result<(), Error>;
    fn replace(&mut self, index: usize, value: T) -> Result<(), Error>;
    fn update<U: UpdateMap<T>>(
        &mut self,
        updates: U,
        hash_updates: Option<BTreeMap<(usize, usize), Hash256>>,
    ) -> Result<(), Error>;
}

Required Methods§

Source

fn validate_push(current_len: usize) -> Result<(), Error>

Source

fn replace(&mut self, index: usize, value: T) -> Result<(), Error>

Source

fn update<U: UpdateMap<T>>( &mut self, updates: U, hash_updates: Option<BTreeMap<(usize, usize), Hash256>>, ) -> Result<(), Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, N> MutList<T> for ListInner<T, N>
where T: Value, N: Unsigned,

Source§

impl<T, N> MutList<T> for VectorInner<T, N>
where T: Value, N: Unsigned,