Skip to main content

TypedRuntime

Trait TypedRuntime 

Source
pub trait TypedRuntime: Runtime {
    // Provided methods
    fn subscribe<'life0, 'life1, 'async_trait, M>(
        &'life0 self,
        topic: &'life1 Topic<M>,
        actor: ActorRef<M>,
    ) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             M: CloneableMessage + 'static + 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn publish<'life0, 'life1, 'async_trait, M>(
        &'life0 self,
        topic: &'life1 Topic<M>,
        message: M,
    ) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             M: CloneableMessage + 'static + 'async_trait,
             Self: Sync + 'async_trait { ... }
    fn send_message<'life0, 'async_trait, M>(
        &'life0 self,
        message: M,
        addr: ActorRef<M>,
    ) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             M: 'async_trait + CloneableMessage + 'static,
             Self: Sync + 'async_trait { ... }
}
Expand description

Type-safe convenience layer over Runtime for strongly-typed topics and direct messaging to actors.

Provided Methods§

Source

fn subscribe<'life0, 'life1, 'async_trait, M>( &'life0 self, topic: &'life1 Topic<M>, actor: ActorRef<M>, ) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, M: CloneableMessage + 'static + 'async_trait, Self: Sync + 'async_trait,

Source

fn publish<'life0, 'life1, 'async_trait, M>( &'life0 self, topic: &'life1 Topic<M>, message: M, ) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, M: CloneableMessage + 'static + 'async_trait, Self: Sync + 'async_trait,

Source

fn send_message<'life0, 'async_trait, M>( &'life0 self, message: M, addr: ActorRef<M>, ) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>
where 'life0: 'async_trait, M: 'async_trait + CloneableMessage + 'static, Self: Sync + 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> TypedRuntime for T
where T: Runtime + ?Sized,