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

Iterates over the items in the store, using lexicographic ordering over the keys.

The iterator is pipelined to the server, such that the client can immediately send requests over the new connection.

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§