Struct git2::Odb
[−]
[src]
pub struct Odb<'repo> { /* fields omitted */ }
A structure to represent a git object database
Methods
impl<'repo> Odb<'repo>
[src]
fn reader(&self, oid: Oid) -> Result<OdbReader, Error>
[src]
Create object database reading stream
Note that most backends do not support streaming reads because they store their objects as compressed/delta'ed blobs.
fn writer(&self, size: usize, obj_type: ObjectType) -> Result<OdbWriter, Error>
[src]
Create object database writing stream
The type and final length of the object must be specified when opening the stream.
fn foreach<C>(&self, callback: C) -> Result<(), Error> where
C: FnMut(&Oid) -> bool,
[src]
C: FnMut(&Oid) -> bool,
Iterate over all objects in the object database
fn read(&self, oid: Oid) -> Result<OdbObject, Error>
[src]
Read object from the database.
fn exists(&self, oid: Oid) -> bool
[src]
Checks if the object database has an object.