Skip to main content

Writer

Trait Writer 

Source
pub trait Writer {
    // Required methods
    fn write_tree(
        &self,
        refs: RefsEntry,
        signature: SignatureEntry,
    ) -> Result<Oid, WriteTree>;
    fn write_commit(&self, bytes: &[u8]) -> Result<Oid, WriteCommit>;
}
Expand description

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

Required Methods§

Source

fn write_tree( &self, refs: RefsEntry, signature: SignatureEntry, ) -> Result<Oid, WriteTree>

Write the RefsEntry and SignatureEntry to two separate Git blobs within a shared Git tree.

Returns the Oid of the Git tree.

§Errors
Source

fn write_commit(&self, bytes: &[u8]) -> Result<Oid, WriteCommit>

Write the given Git commit, as bytes, to the Git object database.

Returns the Oid of the Git commit.

§Errors

Implementors§

Source§

impl Writer for radicle_node::git::raw::Repository

Source§

impl Writer for radicle_node::storage::git::Repository