Skip to main content

Reader

Trait Reader 

Source
pub trait Reader {
    // Required methods
    fn read_commit(&self, oid: &Oid) -> Result<Option<Vec<u8>>, ReadCommit>;
    fn read_blob(
        &self,
        commit: &Oid,
        path: &Path,
    ) -> Result<Option<Blob>, ReadBlob>;
}
Expand description

Git object reader, generally a Git repository, or its corresponding Object Database (ODB).

Required Methods§

Source

fn read_commit(&self, oid: &Oid) -> Result<Option<Vec<u8>>, ReadCommit>

Read the raw bytes of a commit object identified by oid.

Returns None if no such object exists.

§Errors
Source

fn read_blob(&self, commit: &Oid, path: &Path) -> Result<Option<Blob>, ReadBlob>

Read the raw bytes of the blob at path within the tree of commit.

Returns None if the path does not exist in that tree.

§Errors

Implementors§

Source§

impl Reader for radicle_node::git::raw::Repository

Source§

impl Reader for radicle_node::storage::git::Repository