Struct MountOptions

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

mount options.

Implementations§

Source§

impl MountOptions

Source

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

set fuse filesystem mount user_id, default is current uid.

Source

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

set fuse filesystem mount group_id, default is current gid.

Source

pub fn fs_name(&mut self, name: impl Into<String>) -> &mut Self

set fuse filesystem name, default is fuse.

Source

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

set fuse filesystem allow_root mount option, default is disable.

Source

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

set fuse filesystem allow_other mount option, default is disable.

Source

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

set fuse filesystem ro mount option, default is disable.

Source

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

allow fuse filesystem mount on a non-empty directory, default is not allowed.

Source

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

set fuse filesystem default_permissions mount option, default is disable.

When default_permissions is set, the raw::access and path::access is useless.

Source

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

don’t apply umask to file mode on create operations, default is disable.

Source

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

make kernel support zero-message opens, default is disable

Source

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

make kernel support zero-message opendir, default is disable

Source

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

fs handle killing suid/sgid/cap on write/chown/trunc, default is disable.

Source

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

try to set the FUSE_WRITEBACK_CACHE enable write back cache for buffered writes, default is disable.

§Notes:

if enable this feature, when write flags has FUSE_WRITE_CACHE, file handle is guessed.

Source

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

force filesystem use readdirplus only, when kernel use readdir will return ENOSYS, default is disable.

§Notes:

this may don’t work with some old Linux Kernel.

Source

pub fn custom_options( &mut self, custom_options: impl Into<OsString>, ) -> &mut Self

set custom options for fuse filesystem, the custom options will be used in mount

Trait Implementations§

Source§

impl Clone for MountOptions

Source§

fn clone(&self) -> MountOptions

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 MountOptions

Source§

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

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

impl Default for MountOptions

Source§

fn default() -> MountOptions

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

impl PartialEq for MountOptions

Source§

fn eq(&self, other: &MountOptions) -> 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 Eq for MountOptions

Source§

impl StructuralPartialEq for MountOptions

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> 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> 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> 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.
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