Struct FxFilesystemBuilder

Source
pub struct FxFilesystemBuilder { /* private fields */ }

Implementations§

Source§

impl FxFilesystemBuilder

Source

pub fn new() -> Self

Source

pub fn format(self, format: bool) -> Self

Sets whether the block device should be formatted when opened. Defaults to false.

Source

pub fn trace(self, trace: bool) -> Self

Enables or disables trace level logging. Defaults to false.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn journal_options(self, journal_options: JournalOptions) -> Self

Sets the options for the journal.

Source

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.

Source

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.

Source

pub fn fsck_after_every_transaction( self, fsck_after_every_transaction: bool, ) -> Self

Enables or disables running fsck after every transaction. Defaults to false.

Source

pub fn trim_config( self, delay_and_interval: Option<(Duration, Duration)>, ) -> Self

Source

pub async fn open(self, device: DeviceHolder) -> Result<OpenFxFilesystem, Error>

Constructs an FxFilesystem object with the specified settings.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

Source§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V