pub struct Mount { /* private fields */ }Expand description
An instance of a filesystem mounted in a namespace.
At a mount, path traversal switches from one filesystem to another. The client sees a composed directory structure that glues together the directories from the underlying FsNodes from those filesystems.
The mounts in a namespace form a mount tree, with mountpoint pointing to the parent and
submounts pointing to the children.
Implementations§
Source§impl Mount
impl Mount
pub fn new( mounts_guard: &MountsWriteToken, what: WhatToMount, flags: MountpointFlags, ) -> Arc<Mount> ⓘ
Sourcepub fn root(self: &Arc<Mount>) -> NamespaceNode
pub fn root(self: &Arc<Mount>) -> NamespaceNode
A namespace node referring to the root of the mount.
pub fn move_mount( source_mount: &Arc<Mount>, target_mount: &Arc<Mount>, target_dir: &DirEntryHandle, ) -> Result<(), Errno>
pub fn change_propagation( self: &Arc<Mount>, mounts_guard: &MountsWriteToken, flag: MountFlags, recursive: bool, )
Sourcepub fn update_flags(self: &Arc<Mount>, flags: MountpointFlags)
pub fn update_flags(self: &Arc<Mount>, flags: MountpointFlags)
Updates the Mount with the per-mount flags specified in flags, while preserving the
existing access-time flag if no access-time flag is set in flags.
pub fn unmount( &self, mounts_guard: &MountsWriteToken, flags: UnmountFlags, ) -> Result<(), Errno>
Sourcepub fn security_state(&self) -> &FileSystemState
pub fn security_state(&self) -> &FileSystemState
Returns the security state of the fs.
Sourcepub fn reconfigure_fs(
&self,
current_task: &CurrentTask,
flags: FileSystemFlags,
) -> Result<(), Errno>
pub fn reconfigure_fs( &self, current_task: &CurrentTask, flags: FileSystemFlags, ) -> Result<(), Errno>
Reconfigures the flags for the FileSystem backing this mount point.
Sourcepub fn has_submount(&self, dir_entry: &DirEntryHandle) -> bool
pub fn has_submount(&self, dir_entry: &DirEntryHandle) -> bool
Returns true if there is a submount on top of dir_entry.
Sourcepub fn mountpoint(&self) -> Option<NamespaceNode>
pub fn mountpoint(&self) -> Option<NamespaceNode>
The NamespaceNode on which this Mount is mounted.
Sourcepub fn add_submount_internal(
self: &Arc<Mount>,
guard: &MountsWriteToken,
dir: &DirEntryHandle,
mount: Arc<Mount>,
)
pub fn add_submount_internal( self: &Arc<Mount>, guard: &MountsWriteToken, dir: &DirEntryHandle, mount: Arc<Mount>, )
Add a child mount without propagating it to the peer group. For internal use only.
pub fn remove_submount_internal( self: &Arc<Mount>, guard: &MountsWriteToken, mount_hash_key: &ArcKey<DirEntry>, ) -> Result<(), Errno>
Is the mount in a peer group? Corresponds to MS_SHARED.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Mount
impl !RefUnwindSafe for Mount
impl Send for Mount
impl Sync for Mount
impl Unpin for Mount
impl UnsafeUnpin for Mount
impl !UnwindSafe for Mount
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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