Skip to main content

ObjectSource

Trait ObjectSource 

Source
pub trait ObjectSource {
    // Required methods
    fn get_tree(&self, hash: &ContentHash) -> Result<Option<Tree>>;
    fn get_state(&self, id: &ChangeId) -> Result<Option<State>>;
    fn get_blob(&self, hash: &ContentHash) -> Result<Option<Blob>>;

    // Provided method
    fn get_blob_bytes(&self, hash: &ContentHash) -> Result<Option<Bytes>> { ... }
}
Expand description

Read-only subset of ObjectStore needed by object graph walkers.

Required Methods§

Provided Methods§

Source

fn get_blob_bytes(&self, hash: &ContentHash) -> Result<Option<Bytes>>

Zero-copy variant of get_blob.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§