pub struct FileBlobStore { /* private fields */ }Expand description
Durable filesystem-backed blob store.
Blobs are stored under blobs/sha256/aa/bb/<cid-hex> below the configured
root directory. Writes are content-addressed and idempotent; a completed
write is published with an atomic rename inside the target directory.
Implementations§
Source§impl FileBlobStore
impl FileBlobStore
Sourcepub fn open(root: impl Into<PathBuf>) -> Result<Self, FileBlobStoreError>
pub fn open(root: impl Into<PathBuf>) -> Result<Self, FileBlobStoreError>
Open or create a filesystem blob store rooted at root.
Sourcepub fn namespace_dir(&self) -> PathBuf
pub fn namespace_dir(&self) -> PathBuf
Return the namespace directory that contains sharded blob files.
Sourcepub fn path_for_ref(&self, reference: &BlobRef) -> PathBuf
pub fn path_for_ref(&self, reference: &BlobRef) -> PathBuf
Return the filesystem path for a blob reference.
Trait Implementations§
Source§impl BlobStore for FileBlobStore
impl BlobStore for FileBlobStore
Source§type Error = FileBlobStoreError
type Error = FileBlobStoreError
Error type for blob storage operations.
Source§fn get_blob(&self, reference: &BlobRef) -> Result<Option<Vec<u8>>, Self::Error>
fn get_blob(&self, reference: &BlobRef) -> Result<Option<Vec<u8>>, Self::Error>
Load a blob by reference.
Source§impl BlobStoreScan for FileBlobStore
impl BlobStoreScan for FileBlobStore
Source§impl Clone for FileBlobStore
impl Clone for FileBlobStore
Source§fn clone(&self) -> FileBlobStore
fn clone(&self) -> FileBlobStore
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 moreAuto Trait Implementations§
impl Freeze for FileBlobStore
impl RefUnwindSafe for FileBlobStore
impl Send for FileBlobStore
impl Sync for FileBlobStore
impl Unpin for FileBlobStore
impl UnsafeUnpin for FileBlobStore
impl UnwindSafe for FileBlobStore
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more