Trait AsyncBlockStoreWrite

Source
pub trait AsyncBlockStoreWrite: Send {
    // Required method
    fn write_block(
        &mut self,
        codec: u64,
        hash: u64,
        contents: &[u8],
    ) -> impl Future<Output = Result<Cid, Error>> + Send;
}

Required Methods§

Source

fn write_block( &mut self, codec: u64, hash: u64, contents: &[u8], ) -> impl Future<Output = Result<Cid, Error>> + Send

Write a single block into the block store. This will return the block’s computed hash.

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.

Implementations on Foreign Types§

Source§

impl<T: AsyncBlockStoreWrite> AsyncBlockStoreWrite for &mut T

Source§

fn write_block( &mut self, codec: u64, hash: u64, contents: &[u8], ) -> impl Future<Output = Result<Cid, Error>> + Send

Implementors§