pub trait Write {
    type Error: Error + From<Error>;
    fn write_stream(
        &self,
        kind: Kind,
        size: u64,
        from: impl Read
    ) -> Result<ObjectId, Self::Error>; fn write(&self, object: impl WriteTo) -> Result<ObjectId, Self::Error> { ... }
fn write_buf(
        &self,
        object: Kind,
        from: &[u8]
    ) -> Result<ObjectId, Self::Error> { ... } }
Expand description

Describe the capability to write git objects into an object store.

Associated Types

The error type used for all trait methods.

Note the default implementations require the From<io::Error> bound.

Required methods

As write, but takes an input stream. This is commonly used for writing blobs directly without reading them to memory first.

Provided methods

Write objects using the intrinsic kind of hash into the database, returning id to reference it in subsequent reads.

As write, but takes an object kind along with its encoded bytes.

Implementations on Foreign Types

Implementors