pub struct ServingVolume { /* private fields */ }
Expand description
Represents an opened volume in a [`ServingMultiVolumeFilesystem’] instance.
Implementations§
Source§impl ServingVolume
impl ServingVolume
Sourcepub fn root(&self) -> &DirectoryProxy
pub fn root(&self) -> &DirectoryProxy
Returns a proxy to the root directory of the serving volume.
Sourcepub fn exposed_dir(&self) -> &DirectoryProxy
pub fn exposed_dir(&self) -> &DirectoryProxy
Returns a proxy to the exposed directory of the serving volume.
Sourcepub fn bind_to_path(&mut self, path: &str) -> Result<(), Error>
pub fn bind_to_path(&mut self, path: &str) -> Result<(), Error>
Binds the root directory being served by this filesystem to a path in the local namespace. The path must be absolute, containing no “.” nor “..” entries. The binding will be dropped when self is dropped, or when unbind_path is called. Only one binding is supported.
§Errors
Returns Err
if binding failed, or if a binding already exists.
Sourcepub fn unbind_path(&mut self)
pub fn unbind_path(&mut self)
Remove the namespace binding to the root directory being served by this volume, if there is one. If there is no binding, this function does nothing. After this, it is safe to call bind_to_path again.
pub fn bound_path(&self) -> Option<&str>
Sourcepub async fn query(&self) -> Result<Box<FilesystemInfo>, QueryError>
pub async fn query(&self) -> Result<Box<FilesystemInfo>, QueryError>
Auto Trait Implementations§
impl Freeze for ServingVolume
impl !RefUnwindSafe for ServingVolume
impl Send for ServingVolume
impl Sync for ServingVolume
impl Unpin for ServingVolume
impl !UnwindSafe for ServingVolume
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