References

Trait 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.

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§