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§
Sourcefn write_tree(
&self,
refs: RefsEntry,
signature: SignatureEntry,
) -> Result<Oid, WriteTree>
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
error::WriteTree::Refs: failed to write the references Git blob.error::WriteTree::Signature: failed to write the signature Git blob.error::WriteTree::Write: failed to write the Git tree.
Sourcefn write_commit(&self, bytes: &[u8]) -> Result<Oid, WriteCommit>
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
error::WriteCommit: failed to write the Git commit.