Trait libipld_core::codec::References

source ·
pub trait References<C: Codec>: Sized {
    // Required method
    fn references<R: Read + Seek, E: Extend<Cid>>(
        c: C,
        r: &mut R,
        set: &mut E
    ) -> Result<()>;
}
Expand description

References trait.

This trait is generic over a codec, so that different codecs can be implemented for the same type.

Required Methods§

source

fn references<R: Read + Seek, E: Extend<Cid>>( c: C, r: &mut R, set: &mut E ) -> Result<()>

Scrape the references from an impl Read.

It takes a specific codec as parameter, so that the References can be generic over an enum that contains multiple codecs.

Object Safety§

This trait is not object safe.

Implementors§