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 read_item(
        &mut self,
        request: Request<ReadItem, ___T>,
        responder: Responder<ReadItem, ___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 read_item( &mut self, request: Request<ReadItem, ___T>, responder: Responder<ReadItem, ___T>, ) -> impl Future<Output = ()> + Send

Reads an item from the store.

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§