Skip to main content

StoreLocalServerHandler

Trait StoreLocalServerHandler 

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

    // Provided method
    fn on_unknown_interaction(
        &mut self,
        ordinal: u64,
    ) -> impl Future<Output = ()> { ... }
}
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 = ()>

Writes an item to the store.

Source

fn iterate( &mut self, request: Request<Iterate, ___T>, responder: Responder<Iterate, ___T>, ) -> impl Future<Output = ()>

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 = ()>

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.

Implementations on Foreign Types§

Source§

impl<___H, ___T> StoreLocalServerHandler<___T> for Local<___H>
where ___H: StoreServerHandler<___T>, ___T: Transport,

Source§

async fn write_item( &mut self, request: Request<WriteItem, ___T>, responder: Responder<WriteItem, ___T>, )

Source§

async fn iterate( &mut self, request: Request<Iterate, ___T>, responder: Responder<Iterate, ___T>, )

Source§

async fn on_unknown_interaction(&mut self, ordinal: u64)

Implementors§