Trait git_repository::prelude::Write [−][src]
pub trait Write {
type Error: Error + From<Error>;
fn write_stream(
&self,
kind: Kind,
size: u64,
from: impl Read,
hash: Kind
) -> Result<ObjectId, Self::Error>;
fn write(
&self,
object: &Object,
hash: Kind
) -> Result<ObjectId, Self::Error> { ... }
fn write_buf(
&self,
object: Kind,
from: &[u8],
hash: Kind
) -> Result<ObjectId, Self::Error> { ... }
}
Expand description
Describe the capability to write git objects into an object store.
Associated Types
Required methods
Provided methods
Implementations on Foreign Types
Write the given buffer in from
to disk in one syscall at best.
This will cost at least 4 IO operations.
Write the given stream in from
to disk with at least one syscall.
This will cost at least 4 IO operations.