Trait overclock::core::Route

source ·
pub trait Route<M>: Send + Sync + DynClone {
    // Required methods
    fn try_send_msg<'life0, 'async_trait>(
        &'life0 self,
        message: M
    ) -> Pin<Box<dyn Future<Output = Result<Option<M>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn send_msg<'life0, 'async_trait>(
        &'life0 self,
        message: M
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Dynamic route as trait object, should be implemented on the actor’s handle

Required Methods§

source

fn try_send_msg<'life0, 'async_trait>( &'life0 self, message: M ) -> Pin<Box<dyn Future<Output = Result<Option<M>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Try to send message to the channel.

source

fn send_msg<'life0, 'async_trait>( &'life0 self, message: M ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

if the Route is behind lock, drop the lock before invoking this method.

Trait Implementations§

source§

impl<'clone, M> Clone for Box<dyn Route<M> + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone, M> Clone for Box<dyn Route<M> + Send + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone, M> Clone for Box<dyn Route<M> + Send + Sync + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone, M> Clone for Box<dyn Route<M> + Sync + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§

source§

impl<M: 'static + Send, E> Route<M> for AbortableBoundedHandle<E>where E: TryFrom<M> + Send, E::Error: Send,

source§

impl<M: 'static + Send, E> Route<M> for AbortableUnboundedHandle<E>where E: TryFrom<M> + Send,

source§

impl<M: 'static + Send, E> Route<M> for BoundedHandle<E>where E: TryFrom<M> + Send, E::Error: Send,

source§

impl<M: 'static + Send, E> Route<M> for UnboundedHandle<E>where E: TryFrom<M> + Send,