pub struct MountManager { /* private fields */ }Expand description
Manages mount/unmount lifecycle for projected filesystems.
Implementations§
Source§impl MountManager
impl MountManager
pub fn new(mounts_dir: &Path) -> Result<Self, MountError>
Sourcepub fn mountpoint_for(&self, env_id: &ContentHash) -> PathBuf
pub fn mountpoint_for(&self, env_id: &ContentHash) -> PathBuf
Get the mountpoint path for an environment.
Sourcepub fn register_mount(
&mut self,
env_id: ContentHash,
) -> Result<&MountHandle, MountError>
pub fn register_mount( &mut self, env_id: ContentHash, ) -> Result<&MountHandle, MountError>
Register a mount (called after FUSE mount succeeds).
Sourcepub fn unregister_mount(&mut self, mountpoint: &Path) -> Result<(), MountError>
pub fn unregister_mount(&mut self, mountpoint: &Path) -> Result<(), MountError>
Unregister a mount (called after FUSE unmount succeeds).
Sourcepub fn is_mounted(&self, mountpoint: &Path) -> bool
pub fn is_mounted(&self, mountpoint: &Path) -> bool
Check if a mountpoint is currently mounted.
Sourcepub fn active_mounts(&self) -> Vec<&MountHandle>
pub fn active_mounts(&self) -> Vec<&MountHandle>
Get all active mount handles.
Auto Trait Implementations§
impl Freeze for MountManager
impl RefUnwindSafe for MountManager
impl Send for MountManager
impl Sync for MountManager
impl Unpin for MountManager
impl UnsafeUnpin for MountManager
impl UnwindSafe for MountManager
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