[][src]Trait ledb_actix::StorageAddrExt

pub trait StorageAddrExt<A> {
    fn get_storage_addr<M, T, E>(&self) -> &Addr<A>
    where
        A: Handler<M> + Send,
        A::Context: ToEnvelope<A, M>,
        M: Message<Result = Result<T, E>> + Send + 'static,
        T: Send + 'static,
        E: Send + 'static
; fn send_query<M, T, E>(
        &self,
        msg: M
    ) -> Pin<Box<dyn Future<Output = Result<T, Either<MailboxError, E>>> + Send>>
    where
        A: Handler<M> + Send,
        A::Context: ToEnvelope<A, M>,
        M: Message<Result = Result<T, E>> + Send + 'static,
        T: Send + 'static,
        E: Send + 'static
, { ... } }

Helper for sending queries

This is alternative to Addr<Storage>::send which unwraps results of type Result using Either type for wrapping errors.

Required methods

fn get_storage_addr<M, T, E>(&self) -> &Addr<A> where
    A: Handler<M> + Send,
    A::Context: ToEnvelope<A, M>,
    M: Message<Result = Result<T, E>> + Send + 'static,
    T: Send + 'static,
    E: Send + 'static, 

Loading content...

Provided methods

fn send_query<M, T, E>(
    &self,
    msg: M
) -> Pin<Box<dyn Future<Output = Result<T, Either<MailboxError, E>>> + Send>> where
    A: Handler<M> + Send,
    A::Context: ToEnvelope<A, M>,
    M: Message<Result = Result<T, E>> + Send + 'static,
    T: Send + 'static,
    E: Send + 'static, 

Send query and get unwrapped result

Loading content...

Implementations on Foreign Types

impl StorageAddrExt<Storage> for Addr<Storage>[src]

Loading content...

Implementors

Loading content...