pub struct Remount { /* private fields */ }Expand description
A remount definition
Usually it is used to change mount flags for a mounted filesystem. Especially to make a readonly filesystem writable or vice versa.
Implementations§
Source§impl Remount
impl Remount
Sourcepub fn new<A: AsRef<Path>>(path: A) -> Remount
pub fn new<A: AsRef<Path>>(path: A) -> Remount
Create a new Remount operation
By default it doesn’t modify any flags. So is basically useless, you should set some flags to make it effective.
Sourcepub fn bind(self, flag: bool) -> Remount
pub fn bind(self, flag: bool) -> Remount
Set bind flag Note: remount readonly doesn’t work without MS_BIND flag inside unpriviledged user namespaces
Sourcepub fn nodiratime(self, flag: bool) -> Remount
pub fn nodiratime(self, flag: bool) -> Remount
Set nodiratime flag
Sourcepub fn strictatime(self, flag: bool) -> Remount
pub fn strictatime(self, flag: bool) -> Remount
Set strictatime flag
Sourcepub fn synchronous(self, flag: bool) -> Remount
pub fn synchronous(self, flag: bool) -> Remount
Set synchronous flag
Sourcepub fn bare_remount(self) -> Result<(), OSError>
pub fn bare_remount(self) -> Result<(), OSError>
Execute a remount
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Remount
impl RefUnwindSafe for Remount
impl Send for Remount
impl Sync for Remount
impl Unpin for Remount
impl UnwindSafe for Remount
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
Mutably borrows from an owned value. Read more