[−][src]Trait git_odb::Write
Associated Types
Loading content...Required methods
fn write_stream(
&self,
kind: Kind,
size: u64,
from: impl Read,
hash: HashKind
) -> Result<Id, Self::Error>
&self,
kind: Kind,
size: u64,
from: impl Read,
hash: HashKind
) -> Result<Id, Self::Error>
As write
, but takes an input stream. This is commonly used for writing blobs directly without reading them to memory first.
Provided methods
fn write(&self, object: &Object, hash: HashKind) -> Result<Id, Self::Error>
Write object
using the given kind of hash
into the database, returning id to reference it in subsequent reads.
fn write_buf(
&self,
object: Kind,
from: &[u8],
hash: HashKind
) -> Result<Id, Self::Error>
&self,
object: Kind,
from: &[u8],
hash: HashKind
) -> Result<Id, Self::Error>
As write
, but takes an object
kind along with its encoded bytes.
Implementors
impl Write for git_odb::compound::Db
[src]
type Error = Error
fn write(&self, object: &Object, hash: HashKind) -> Result<Id, Self::Error>
[src]
fn write_buf(
&self,
object: Kind,
from: &[u8],
hash: HashKind
) -> Result<Id, Self::Error>
[src]
&self,
object: Kind,
from: &[u8],
hash: HashKind
) -> Result<Id, Self::Error>
fn write_stream(
&self,
kind: Kind,
size: u64,
from: impl Read,
hash: HashKind
) -> Result<Id, Self::Error>
[src]
&self,
kind: Kind,
size: u64,
from: impl Read,
hash: HashKind
) -> Result<Id, Self::Error>
impl Write for git_odb::loose::db::Db
[src]
type Error = Error
fn write_buf(
&self,
kind: Kind,
from: &[u8],
hash: HashKind
) -> Result<Id, Self::Error>
[src]
&self,
kind: Kind,
from: &[u8],
hash: HashKind
) -> Result<Id, Self::Error>
fn write_stream(
&self,
kind: Kind,
size: u64,
from: impl Read,
hash: HashKind
) -> Result<Id, Self::Error>
[src]
&self,
kind: Kind,
size: u64,
from: impl Read,
hash: HashKind
) -> Result<Id, Self::Error>