Skip to main content

StoreServerHandler

Trait StoreServerHandler 

Source
pub trait StoreServerHandler<___T: Transport = Channel> {
    // Required methods
    fn write_item(
        &mut self,
        request: Request<WriteItem, ___T>,
        responder: Responder<WriteItem, ___T>,
    ) -> impl Future<Output = ()> + Send;
    fn export(
        &mut self,
        request: Request<Export, ___T>,
        responder: Responder<Export, ___T>,
    ) -> impl Future<Output = ()> + Send;

    // Provided method
    fn on_unknown_interaction(
        &mut self,
        ordinal: u64,
    ) -> impl Future<Output = ()> + Send { ... }
}
Expand description

A server handler for the Store protocol.

See Store for more details.

Required Methods§

Source

fn write_item( &mut self, request: Request<WriteItem, ___T>, responder: Responder<WriteItem, ___T>, ) -> impl Future<Output = ()> + Send

Writes an item to the store.

Source

fn export( &mut self, request: Request<Export, ___T>, responder: Responder<Export, ___T>, ) -> impl Future<Output = ()> + Send

Exports the entire store as a persistent Exportable FIDL object into a VMO provided by the client.

By having the client provide (and speculatively size) the VMO, we force the party requesting the relatively heavy load of generating a backup to acknowledge and bear some of the costs.

This method operates by having the client supply an empty VMO, which the server then attempts to fill. Notice that the server removes the zx.Rights.WRITE and zx.Rights.SET_PROPERTY rights from the returned VMO - not even the requesting client may alter the backup once it has been minted by the server.

Provided Methods§

Source

fn on_unknown_interaction( &mut self, ordinal: u64, ) -> impl Future<Output = ()> + Send

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.

Implementors§