pub struct ServingMultiVolumeFilesystem { /* private fields */ }
Expand description
Asynchronously manages a serving multivolume filesystem. Created from
Filesystem::serve_multi_volume()
.
Implementations§
Source§impl ServingMultiVolumeFilesystem
impl ServingMultiVolumeFilesystem
Sourcepub async fn has_volume(&mut self, volume: &str) -> Result<bool, Error>
pub async fn has_volume(&mut self, volume: &str) -> Result<bool, Error>
Returns whether the given volume exists.
Sourcepub async fn create_volume(
&self,
volume: &str,
create_options: CreateOptions,
options: MountOptions,
) -> Result<ServingVolume, Error>
pub async fn create_volume( &self, volume: &str, create_options: CreateOptions, options: MountOptions, ) -> Result<ServingVolume, Error>
Creates and mounts the volume. Fails if the volume already exists.
If options.crypt
is set, the volume will be encrypted using the provided Crypt instance.
If options.as_blob
is set, creates a blob volume that is mounted as a blob filesystem.
Sourcepub async fn remove_volume(&self, volume: &str) -> Result<(), Error>
pub async fn remove_volume(&self, volume: &str) -> Result<(), Error>
Deletes the volume. Fails if the volume is already mounted.
Sourcepub async fn open_volume(
&self,
volume: &str,
options: MountOptions,
) -> Result<ServingVolume, Error>
pub async fn open_volume( &self, volume: &str, options: MountOptions, ) -> Result<ServingVolume, Error>
Mounts an existing volume. Fails if the volume is already mounted or doesn’t exist.
If crypt
is set, the volume will be decrypted using the provided Crypt instance.
Sourcepub async fn set_byte_limit(
&self,
volume: &str,
byte_limit: u64,
) -> Result<(), Error>
pub async fn set_byte_limit( &self, volume: &str, byte_limit: u64, ) -> Result<(), Error>
Sets the max byte limit for a volume. Fails if the volume is not mounted.
pub async fn check_volume( &self, volume: &str, options: CheckOptions, ) -> Result<(), Error>
Sourcepub fn exposed_dir(&self) -> &DirectoryProxy
pub fn exposed_dir(&self) -> &DirectoryProxy
Provides access to the internal |exposed_dir| for use in testing callsites which need directory access.
Sourcepub async fn shutdown(self) -> Result<(), ShutdownError>
pub async fn shutdown(self) -> Result<(), ShutdownError>
Attempts to shutdown the filesystem using the fidl_fuchsia_fs::AdminProxy::shutdown()
FIDL method.
§Errors
Returns Err
if the shutdown failed.
Sourcepub fn take_exposed_dir(self) -> DirectoryProxy
pub fn take_exposed_dir(self) -> DirectoryProxy
Take the exposed dir from this filesystem instance, dropping the management struct without shutting the filesystem down. This leaves the caller with the responsibility of shutting down the filesystem, and the filesystem component if necessary.