Struct git_odb::loose::Store [−][src]
pub struct Store {
pub path: PathBuf,
}Expand description
A database for reading and writing objects to disk, one file per object.
Fields
path: PathBufThe directory in which objects are stored, containing 256 folders representing the hashes first byte.
Implementations
Object lookup
Returns true if the given id is contained in our repository.
Return the object identified by the given ObjectId if present in this database,
writing its raw data into the given out buffer.
Returns Err if there was an error locating or reading the object. Returns Ok<None> if
there was no such object.
Iteration and traversal
Return an iterator over all objects contained in the database.
The Ids returned by the iterator can typically be used in the locate(…) method.
Note that the result is not sorted or stable, thus ordering can change between runs.
Notes
Iter is used instead of impl Iterator<…> to allow using this iterator in struct fields, as is currently
needed if iterators need to be implemented by hand in the absence of generators.
Initialization
Trait Implementations
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.