pub unsafe trait StorageMut: Storage + AsMut<[u8]> {
    type Immutable: Storage<Creator = Self>;

    // Required method
    fn push_slice(&mut self, s: &[u8]);
}
Expand description

Trait for extra functionality of a mutable storage.

This is in addition to what an immutable storage must satisfy.

Safety

The storage must act “sane”. But what exactly it means is not yet analyzed and may change in future versions. Don’t implement the trait (at least not yet).

Required Associated Types§

source

type Immutable: Storage<Creator = Self>

An immutable counter-part storage.

Required Methods§

source

fn push_slice(&mut self, s: &[u8])

Adds some more bytes to the end of the storage.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl StorageMut for BytesMut

§

type Immutable = Bytes

source§

fn push_slice(&mut self, s: &[u8])

Implementors§