pub trait Write {
type Error: Error + From<Error>;
// Required method
fn write_stream(
&self,
kind: Kind,
size: u64,
from: impl Read,
) -> Result<ObjectId, Self::Error>;
// Provided methods
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.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.