Struct StartOptions

Source
pub struct StartOptions {
    pub read_only: Option<bool>,
    pub verbose: Option<bool>,
    pub fsck_after_every_transaction: Option<bool>,
    pub write_compression_algorithm: Option<CompressionAlgorithm>,
    pub write_compression_level: Option<i32>,
    pub cache_eviction_policy_override: Option<EvictionPolicyOverride>,
    pub startup_profiling_seconds: Option<u32>,
    pub inline_crypto_enabled: Option<bool>,
    pub barriers_enabled: Option<bool>,
    /* private fields */
}
Expand description

Options for starting a filesystem.

Fields§

§read_only: Option<bool>

Start the filesystem in read-only mode.

§verbose: Option<bool>

Enable verbose logging.

§fsck_after_every_transaction: Option<bool>

If true, run fsck after every transaction. This is for testing purposes only - it’s very slow to run a filesystem like this.

§write_compression_algorithm: Option<CompressionAlgorithm>

A compression algorithm specifier for the filesystem to use when storing files (if the filesystem supports it). Defaults to ZSTD_CHUNKED.

§write_compression_level: Option<i32>

An optional compression level for the filesystem to use when storing files (if the filesystem and the configured |write_compression_algorithm| supports it). Setting to < 0 indicates no value (the filesystem chooses a default if necessary).

§cache_eviction_policy_override: Option<EvictionPolicyOverride>

An optional eviction policy specifier for the filesystem to use for in-memory structures (if the filesystem supports it), specifically for pager-backed files.

§startup_profiling_seconds: Option<u32>

Use profiling for the first N seconds after filesystem start. Records the access patterns of objects for N seconds and if the profile already exists, prefetch data and hold the vmos in cache for N seconds. Functionally this means that the first launch with this option records the profile and all other launches with this option will replay that profile.

§inline_crypto_enabled: Option<bool>

If true, configures the filesystem to use the hardware’s inline encryption engine when writing encrypted data. This allows the filesystem to store user-encrypted data without being able to read or write the plaintext contents, which enhances security and privacy. Requires the block device to support inline encryption and for barriers_enabled to be true. TODO(https://fxbug.dev/393196849): For now, this flag only prevents the filesystem from computing checksums. Update this comment when the filesystem actually uses inline encryption.

§barriers_enabled: Option<bool>

Configures the filesystem to use barriers instead of checksums to ensure consistency. If set, barriers will be used to enforce proper ordering of data and metadata writes, which is otherwise provided by computing and verifying data checksums. Requires filesystem support; at the time of writing, only Fxfs uses this argument. Must be set to true if inline_crypto_enabled is true.

Trait Implementations§

Source§

impl Clone for StartOptions

Source§

fn clone(&self) -> StartOptions

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StartOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<D: ResourceDialect> Decode<StartOptions, D> for StartOptions

Source§

fn new_empty() -> Self

Creates a valid instance of Self. The specific value does not matter, since it will be overwritten by decode.
Source§

unsafe fn decode( &mut self, decoder: &mut Decoder<'_, D>, offset: usize, depth: Depth, ) -> Result<()>

Decodes an object of type T from the decoder’s buffers into self. Read more
Source§

impl Default for StartOptions

Source§

fn default() -> StartOptions

Returns the “default value” for a type. Read more
Source§

impl<D: ResourceDialect> Encode<StartOptions, D> for &StartOptions

Source§

unsafe fn encode( self, encoder: &mut Encoder<'_, D>, offset: usize, depth: Depth, ) -> Result<()>

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

impl PartialEq for StartOptions

Source§

fn eq(&self, other: &StartOptions) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TypeMarker for StartOptions

Source§

type Owned = StartOptions

The owned Rust type which this FIDL type decodes into.
Source§

fn inline_align(_context: Context) -> usize

Returns the minimum required alignment of the inline portion of the encoded object. It must be a (nonzero) power of two.
Source§

fn inline_size(_context: Context) -> usize

Returns the size of the inline portion of the encoded object, including padding for alignment. Must be a multiple of inline_align.
Source§

fn encode_is_copy() -> bool

Returns true if the memory layout of Self::Owned matches the FIDL wire format and encoding requires no validation. When true, we can optimize encoding arrays and vectors of Self::Owned to a single memcpy. Read more
Source§

fn decode_is_copy() -> bool

Returns true if the memory layout of Self::Owned matches the FIDL wire format and decoding requires no validation. When true, we can optimize decoding arrays and vectors of Self::Owned to a single memcpy.
Source§

impl ValueTypeMarker for StartOptions

Source§

type Borrowed<'a> = &'a StartOptions

The Rust type to use for encoding. This is a particular Encode<Self> type cheaply obtainable from &Self::Owned. There are three cases: Read more
Source§

fn borrow(value: &<Self as TypeMarker>::Owned) -> Self::Borrowed<'_>

Cheaply converts from &Self::Owned to Self::Borrowed.
Source§

impl Persistable for StartOptions

Source§

impl StructuralPartialEq for StartOptions

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> Body for T
where T: Persistable,

Source§

type MarkerAtTopLevel = T

The marker type to use when the body is at the top-level.
Source§

type MarkerInResultUnion = T

The marker type to use when the body is nested in a result union.
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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<E> ErrorType for E

Source§

type Marker = E

The marker type.
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.

§

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.