pub trait StorageAdminServerHandler<___T: Transport = Channel> {
// Required methods
fn open_storage(
&mut self,
sender: &ServerSender<StorageAdmin, ___T>,
request: Request<OpenStorage, ___T>,
responder: Responder<OpenStorage>,
) -> impl Future<Output = ()> + Send;
fn list_storage_in_realm(
&mut self,
sender: &ServerSender<StorageAdmin, ___T>,
request: Request<ListStorageInRealm, ___T>,
responder: Responder<ListStorageInRealm>,
) -> impl Future<Output = ()> + Send;
fn open_component_storage_by_id(
&mut self,
sender: &ServerSender<StorageAdmin, ___T>,
request: Request<OpenComponentStorageById, ___T>,
responder: Responder<OpenComponentStorageById>,
) -> impl Future<Output = ()> + Send;
fn delete_component_storage(
&mut self,
sender: &ServerSender<StorageAdmin, ___T>,
request: Request<DeleteComponentStorage, ___T>,
responder: Responder<DeleteComponentStorage>,
) -> impl Future<Output = ()> + Send;
fn get_status(
&mut self,
sender: &ServerSender<StorageAdmin, ___T>,
responder: Responder<GetStatus>,
) -> impl Future<Output = ()> + Send;
fn delete_all_storage_contents(
&mut self,
sender: &ServerSender<StorageAdmin, ___T>,
responder: Responder<DeleteAllStorageContents>,
) -> impl Future<Output = ()> + Send;
}
Expand description
A server handler for the StorageAdmin protocol.
See StorageAdmin
for more details.
Required Methods§
Sourcefn open_storage(
&mut self,
sender: &ServerSender<StorageAdmin, ___T>,
request: Request<OpenStorage, ___T>,
responder: Responder<OpenStorage>,
) -> impl Future<Output = ()> + Send
fn open_storage( &mut self, sender: &ServerSender<StorageAdmin, ___T>, request: Request<OpenStorage, ___T>, responder: Responder<OpenStorage>, ) -> impl Future<Output = ()> + Send
Opens the isolated directory for the given component. The provided moniker is relative to the component that declares the storage capability. Creates the backing sub-directory for this storage if it hasn’t yet been created.
Sourcefn list_storage_in_realm(
&mut self,
sender: &ServerSender<StorageAdmin, ___T>,
request: Request<ListStorageInRealm, ___T>,
responder: Responder<ListStorageInRealm>,
) -> impl Future<Output = ()> + Send
fn list_storage_in_realm( &mut self, sender: &ServerSender<StorageAdmin, ___T>, request: Request<ListStorageInRealm, ___T>, responder: Responder<ListStorageInRealm>, ) -> impl Future<Output = ()> + Send
Lists the descendant components under the specified realm that use the storage capability. The provided moniker is relative to the component that declares the storage capability.
Returns INSTANCE_NOT_FOUND if the realm does not exist, and INVALID_ARGS if |relative_moniker| is malformed.
Sourcefn open_component_storage_by_id(
&mut self,
sender: &ServerSender<StorageAdmin, ___T>,
request: Request<OpenComponentStorageById, ___T>,
responder: Responder<OpenComponentStorageById>,
) -> impl Future<Output = ()> + Send
fn open_component_storage_by_id( &mut self, sender: &ServerSender<StorageAdmin, ___T>, request: Request<OpenComponentStorageById, ___T>, responder: Responder<OpenComponentStorageById>, ) -> impl Future<Output = ()> + Send
Opens the isolated directory for the given storage ID. Creates the backing sub-directory for this storage if it hasn’t yet been created.
Sourcefn delete_component_storage(
&mut self,
sender: &ServerSender<StorageAdmin, ___T>,
request: Request<DeleteComponentStorage, ___T>,
responder: Responder<DeleteComponentStorage>,
) -> impl Future<Output = ()> + Send
fn delete_component_storage( &mut self, sender: &ServerSender<StorageAdmin, ___T>, request: Request<DeleteComponentStorage, ___T>, responder: Responder<DeleteComponentStorage>, ) -> impl Future<Output = ()> + Send
Deletes the contents of the storage for this component. Preserves the component’s subdirectory itself within the storage backing directory. The provided moniker is relative to the component that declares the storage capability.
Sourcefn get_status(
&mut self,
sender: &ServerSender<StorageAdmin, ___T>,
responder: Responder<GetStatus>,
) -> impl Future<Output = ()> + Send
fn get_status( &mut self, sender: &ServerSender<StorageAdmin, ___T>, responder: Responder<GetStatus>, ) -> impl Future<Output = ()> + Send
Get the current status of the storage.
Sourcefn delete_all_storage_contents(
&mut self,
sender: &ServerSender<StorageAdmin, ___T>,
responder: Responder<DeleteAllStorageContents>,
) -> impl Future<Output = ()> + Send
fn delete_all_storage_contents( &mut self, sender: &ServerSender<StorageAdmin, ___T>, responder: Responder<DeleteAllStorageContents>, ) -> impl Future<Output = ()> + Send
Deletes the contents of all the storage. Storage directories are retained so any components using storage will be able to continue using it to create new files and directories.
Returns Error::INTERNAL only if no storage at all could be cleared. Returns successfully even if some errors happen during the deletion progress.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.