Skip to main content

ManifestNodeSource

Trait ManifestNodeSource 

Source
pub trait ManifestNodeSource {
    // Required method
    fn node_bytes(&self, hash: &ContentHash) -> Option<&[u8]>;
}
Expand description

Read access to canonical manifest node bytes, keyed by node address.

The store is content-addressed, so an implementation may be a map, a pack reader, or a network fetcher; nothing here assumes locality.

Required Methods§

Source

fn node_bytes(&self, hash: &ContentHash) -> Option<&[u8]>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ManifestNodeSource for BTreeMap<ContentHash, Vec<u8>>

Source§

fn node_bytes(&self, hash: &ContentHash) -> Option<&[u8]>

Source§

impl ManifestNodeSource for HashMap<ContentHash, Vec<u8>>

Source§

fn node_bytes(&self, hash: &ContentHash) -> Option<&[u8]>

Implementors§