pub struct BucketStore { /* private fields */ }Expand description
Opens buckets, whichever layout the directory uses.
A container directory keeps the shared header in its manifest, so this owns both and hands out readers; a whole-file directory carries the header in each bucket and this just opens paths. Threading one of these through the consumers replaces threading a path per bucket.
Implementations§
Source§impl BucketStore
impl BucketStore
Sourcepub fn open_dir(
bucket_dir: impl AsRef<Path>,
) -> Result<(Self, Vec<BucketManifestEntry>), BucketError>
pub fn open_dir( bucket_dir: impl AsRef<Path>, ) -> Result<(Self, Vec<BucketManifestEntry>), BucketError>
Opens a bucket directory and reads its manifest.
Sourcepub fn files_only() -> Self
pub fn files_only() -> Self
A store for a directory that is known to hold whole bucket files.
pub fn containers(&self) -> Option<&Arc<BucketContainers>>
Sourcepub fn reader(
&self,
entry: &BucketManifestEntry,
) -> Result<BucketReader, BucketError>
pub fn reader( &self, entry: &BucketManifestEntry, ) -> Result<BucketReader, BucketError>
Opens one bucket for reading.
Auto Trait Implementations§
impl Freeze for BucketStore
impl RefUnwindSafe for BucketStore
impl Send for BucketStore
impl Sync for BucketStore
impl Unpin for BucketStore
impl UnsafeUnpin for BucketStore
impl UnwindSafe for BucketStore
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> 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