KernelConfig

Struct KernelConfig 

Source
pub struct KernelConfig { /* private fields */ }
Expand description

Parameters for setting up the connection with FUSE driver and the kernel side behavior.

Implementations§

Source§

impl KernelConfig

Source

pub fn async_read(&mut self, enabled: bool) -> &mut Self

Specify that the filesystem supports asynchronous read requests.

Enabled by default.

Source

pub fn atomic_o_trunc(&mut self, enabled: bool) -> &mut Self

Specify that the filesystem supports the O_TRUNC open flag.

Enabled by default.

Source

pub fn auto_inval_data(&mut self, enabled: bool) -> &mut Self

Specify that the kernel check the validity of attributes on every read.

Enabled by default.

Source

pub fn async_dio(&mut self, enabled: bool) -> &mut Self

Specify that the filesystem supports asynchronous direct I/O submission.

Enabled by default.

Source

pub fn parallel_dirops(&mut self, enabled: bool) -> &mut Self

Specify that the kernel supports parallel directory operations.

Enabled by default.

Source

pub fn handle_killpriv(&mut self, enabled: bool) -> &mut Self

Specify that the filesystem is responsible for unsetting setuid and setgid bits when a file is written, truncated, or its owner is changed.

Enabled by default.

Source

pub fn posix_locks(&mut self, enabled: bool) -> &mut Self

The filesystem supports the POSIX-style file lock.

Source

pub fn flock_locks(&mut self, enabled: bool) -> &mut Self

Specify that the filesystem supports the flock handling.

Source

pub fn export_support(&mut self, enabled: bool) -> &mut Self

Specify that the filesystem supports lookups of "." and "..".

Source

pub fn dont_mask(&mut self, enabled: bool) -> &mut Self

Specify that the kernel should not apply the umask to the file mode on create operations.

Source

pub fn writeback_cache(&mut self, enabled: bool) -> &mut Self

Specify that the kernel should enable writeback caching.

Source

pub fn posix_acl(&mut self, enabled: bool) -> &mut Self

Specify that the filesystem supports POSIX access control lists.

Source

pub fn max_pages(&mut self, enabled: bool) -> &mut Self

Specify that the value of max_pages should be derived from max_write.

Source

pub fn readdirplus(&mut self, enabled: bool) -> &mut Self

Specify that the filesystem supports readdirplus operations.

Source

pub fn readdirplus_auto(&mut self, enabled: bool) -> &mut Self

Indicates that the kernel uses the adaptive readdirplus.

This option is meaningful only if readdirplus is enabled.

Source

pub fn max_readahead(&mut self, value: u32) -> &mut Self

Set the maximum readahead.

Source

pub fn max_write(&mut self, value: u32) -> &mut Self

Set the maximum size of the write buffer.

§Panic

It causes an assertion panic if the setting value is less than the absolute minimum.

Source

pub fn max_background(&mut self, max_background: u16) -> &mut Self

Return the maximum number of pending background requests.

Source

pub fn congestion_threshold(&mut self, threshold: u16) -> &mut Self

Set the threshold number of pending background requests that the kernel marks the filesystem as congested.

If the setting value is 0, the value is automatically calculated by using max_background.

§Panics

It cause a panic if the setting value is greater than max_background.

Source

pub fn time_gran(&mut self, time_gran: u32) -> &mut Self

Set the timestamp resolution supported by the filesystem.

The setting value has the nanosecond unit and should be a power of 10.

The default value is 1.

Trait Implementations§

Source§

impl Default for KernelConfig

Source§

fn default() -> Self

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

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more