Type Alias ServingFilesystem

Source
pub type ServingFilesystem = ServingSingleVolumeFilesystem;

Aliased Type§

struct ServingFilesystem { /* private fields */ }

Implementations

Source§

impl ServingSingleVolumeFilesystem

Source

pub fn exposed_dir(&self) -> &DirectoryProxy

Returns a proxy to the exposed directory of the serving filesystem.

Source

pub fn root(&self) -> &DirectoryProxy

Returns a proxy to the root directory of the serving filesystem.

Source

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. Only one binding is supported.

§Errors

Returns Err if binding failed.

Source

pub fn bound_path(&self) -> Option<&str>

Source

pub async fn query(&self) -> Result<Box<FilesystemInfo>, QueryError>

Returns a [FilesystemInfo] object containing information about the serving filesystem.

§Errors

Returns Err if querying the filesystem failed.

Source

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.

Source

pub async fn shutdown(self) -> Result<(), ShutdownError>

Attempts to shutdown the filesystem using the fidl_fuchsia_fs::AdminProxy::shutdown() FIDL method and waiting for the filesystem process to terminate.

§Errors

Returns Err if the shutdown failed or the filesystem process did not terminate.

Source

pub async fn kill(self) -> Result<(), Error>

Attempts to kill the filesystem process and waits for the process to terminate.

§Errors

Returns Err if the filesystem process could not be terminated. There is no way to recover the Filesystem from this error.

Trait Implementations

Source§

impl Drop for ServingSingleVolumeFilesystem

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more