pub struct FileObjectStore { /* private fields */ }Expand description
File-backed object store.
Implementations§
Source§impl FileObjectStore
impl FileObjectStore
Sourcepub fn new(layout: RepositoryLayout) -> Self
pub fn new(layout: RepositoryLayout) -> Self
Create a file object store for a repository layout.
Sourcepub fn layout(&self) -> &RepositoryLayout
pub fn layout(&self) -> &RepositoryLayout
Return the repository layout.
Sourcepub fn contains_object(&self, object_type: ObjectType, id: ObjectId) -> bool
pub fn contains_object(&self, object_type: ObjectType, id: ObjectId) -> bool
Return true if an object with this id and type is indexed.
Trait Implementations§
Source§impl Clone for FileObjectStore
impl Clone for FileObjectStore
Source§fn clone(&self) -> FileObjectStore
fn clone(&self) -> FileObjectStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileObjectStore
impl Debug for FileObjectStore
Source§impl ObjectReader for FileObjectStore
impl ObjectReader for FileObjectStore
Source§fn read_object(&self, id: ObjectId) -> Result<Option<ObjectEnvelope>>
fn read_object(&self, id: ObjectId) -> Result<Option<ObjectEnvelope>>
Read an object by ID.
Source§fn read_typed(
&self,
id: ObjectId,
object_type: ObjectType,
) -> Result<Option<ObjectEnvelope>>
fn read_typed( &self, id: ObjectId, object_type: ObjectType, ) -> Result<Option<ObjectEnvelope>>
Read and require a specific object type. Default-implemented in terms of
read_object alone
(RFC 111 §6.1: every implementor – FileObjectStore, ObjectReadSnapshot,
ObjectWriteSession, MemoryObjectStore – gets this for free, and any function generic over
impl ObjectReader can call it without depending on a concrete type). One body, not one per
implementor (Stage 1 review v1 §3): every concrete type’s own read_typed delegates here too.Source§impl ObjectWriter for FileObjectStore
impl ObjectWriter for FileObjectStore
Source§fn write_object(&mut self, envelope: &ObjectEnvelope) -> Result<ObjectId>
fn write_object(&mut self, envelope: &ObjectEnvelope) -> Result<ObjectId>
Write an object envelope after validation.
Auto Trait Implementations§
impl Freeze for FileObjectStore
impl RefUnwindSafe for FileObjectStore
impl Send for FileObjectStore
impl Sync for FileObjectStore
impl Unpin for FileObjectStore
impl UnsafeUnpin for FileObjectStore
impl UnwindSafe for FileObjectStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more