pub struct FxFilesystemBuilder { /* private fields */ }
Implementations§
Source§impl FxFilesystemBuilder
impl FxFilesystemBuilder
pub fn new() -> Self
Sourcepub fn format(self, format: bool) -> Self
pub fn format(self, format: bool) -> Self
Sets whether the block device should be formatted when opened. Defaults to false
.
Sourcepub fn trace(self, trace: bool) -> Self
pub fn trace(self, trace: bool) -> Self
Enables or disables trace level logging. Defaults to false
.
Sourcepub fn read_only(self, read_only: bool) -> Self
pub fn read_only(self, read_only: bool) -> Self
Sets whether the filesystem will be opened in read-only mode. Defaults to false
.
Incompatible with format
.
Sourcepub fn image_builder_mode(self, enabled: bool) -> Self
pub fn image_builder_mode(self, enabled: bool) -> Self
For image building and in-place migration.
This mode avoids the initial write of super blocks and skips the journal for all
transactions. The user must call finalize()
before closing the filesystem to trigger
a compaction of in-memory data structures, a minimal journal and a write to SuperBlock A.
Sourcepub fn roll_metadata_key_byte_count(
self,
roll_metadata_key_byte_count: u64,
) -> Self
pub fn roll_metadata_key_byte_count( self, roll_metadata_key_byte_count: u64, ) -> Self
Sets how often the metadata keys are rolled. See Options::roll_metadata_key_byte_count
.
Sourcepub fn pre_commit_hook(
self,
hook: impl Fn(&Transaction<'_>) -> Result<(), Error> + Send + Sync + 'static,
) -> Self
pub fn pre_commit_hook( self, hook: impl Fn(&Transaction<'_>) -> Result<(), Error> + Send + Sync + 'static, ) -> Self
Sets a callback that runs before every transaction. See Options::pre_commit_hook
.
Sourcepub fn post_commit_hook(
self,
hook: impl Fn() -> BoxFuture<'static, ()> + Send + Sync + 'static,
) -> Self
pub fn post_commit_hook( self, hook: impl Fn() -> BoxFuture<'static, ()> + Send + Sync + 'static, ) -> Self
Sets a callback that runs after every transaction has been committed. See
Options::post_commit_hook
.
Sourcepub fn skip_initial_reap(self, skip_initial_reap: bool) -> Self
pub fn skip_initial_reap(self, skip_initial_reap: bool) -> Self
Sets whether to do an initial reap of the graveyard at mount time. See
Options::skip_initial_reap
. Defaults to false
.
Sourcepub fn journal_options(self, journal_options: JournalOptions) -> Self
pub fn journal_options(self, journal_options: JournalOptions) -> Self
Sets the options for the journal.
Sourcepub fn on_new_allocator(
self,
on_new_allocator: impl Fn(Arc<Allocator>) + Send + Sync + 'static,
) -> Self
pub fn on_new_allocator( self, on_new_allocator: impl Fn(Arc<Allocator>) + Send + Sync + 'static, ) -> Self
Sets a method to be called immediately after creating the allocator.
Sourcepub fn on_new_store(
self,
on_new_store: impl Fn(&ObjectStore) + Send + Sync + 'static,
) -> Self
pub fn on_new_store( self, on_new_store: impl Fn(&ObjectStore) + Send + Sync + 'static, ) -> Self
Sets a method to be called each time a new store is registered with ObjectManager
.
Sourcepub fn fsck_after_every_transaction(
self,
fsck_after_every_transaction: bool,
) -> Self
pub fn fsck_after_every_transaction( self, fsck_after_every_transaction: bool, ) -> Self
Enables or disables running fsck after every transaction. Defaults to false
.
pub fn trim_config( self, delay_and_interval: Option<(Duration, Duration)>, ) -> Self
Sourcepub async fn open(self, device: DeviceHolder) -> Result<OpenFxFilesystem, Error>
pub async fn open(self, device: DeviceHolder) -> Result<OpenFxFilesystem, Error>
Constructs an FxFilesystem
object with the specified settings.
Auto Trait Implementations§
impl Freeze for FxFilesystemBuilder
impl !RefUnwindSafe for FxFilesystemBuilder
impl Send for FxFilesystemBuilder
impl Sync for FxFilesystemBuilder
impl Unpin for FxFilesystemBuilder
impl !UnwindSafe for FxFilesystemBuilder
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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>
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>
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