[][src]Trait ipld_block_builder::Encoder

pub trait Encoder {
    type Codec: Codec;
    type Hash: Multihasher<Code>;
    fn encode<T: Encode<Self::Codec>>(&self, value: &T) -> Result<Block>;
}

Encoder trait.

Associated Types

type Codec: Codec

Ipld codec.

type Hash: Multihasher<Code>

Hasher.

Loading content...

Required methods

fn encode<T: Encode<Self::Codec>>(&self, value: &T) -> Result<Block>

Encodes the value into a block.

Loading content...

Implementors

impl<C: Codec, H: Multihasher<Code>> Encoder for GenericCodec<C, H>[src]

type Codec = C

type Hash = H

Loading content...