Skip to main content

ActorExecutor

Trait ActorExecutor 

Source
pub trait ActorExecutor: Send + Sync {
    // Required methods
    fn supports(&self, actor_type: &str) -> bool;
    fn invoke<'life0, 'async_trait>(
        &'life0 self,
        invocation: ActorMethodInvocation,
    ) -> Pin<Box<dyn Future<Output = Result<ActorMethodOutcome>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn invoke_with_state<'life0, 'life1, 'async_trait>(
        &'life0 self,
        invocation: ActorMethodInvocation,
        state: Option<&'life1 Value>,
    ) -> Pin<Box<dyn Future<Output = Result<ActorMethodOutcome>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn handle_socket_with_state<'life0, 'life1, 'async_trait>(
        &'life0 self,
        invocation: ActorSocketInvocation,
        state: Option<&'life1 Value>,
    ) -> Pin<Box<dyn Future<Output = Result<ActorSocketOutcome>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn handle_socket<'life0, 'async_trait>(
        &'life0 self,
        _invocation: ActorSocketInvocation,
    ) -> Pin<Box<dyn Future<Output = Result<ActorSocketOutcome>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn evict<'life0, 'async_trait>(
        &'life0 self,
        _eviction: ActorMethodEviction,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Source

fn supports(&self, actor_type: &str) -> bool

Source

fn invoke<'life0, 'async_trait>( &'life0 self, invocation: ActorMethodInvocation, ) -> Pin<Box<dyn Future<Output = Result<ActorMethodOutcome>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn invoke_with_state<'life0, 'life1, 'async_trait>( &'life0 self, invocation: ActorMethodInvocation, state: Option<&'life1 Value>, ) -> Pin<Box<dyn Future<Output = Result<ActorMethodOutcome>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn handle_socket_with_state<'life0, 'life1, 'async_trait>( &'life0 self, invocation: ActorSocketInvocation, state: Option<&'life1 Value>, ) -> Pin<Box<dyn Future<Output = Result<ActorSocketOutcome>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn handle_socket<'life0, 'async_trait>( &'life0 self, _invocation: ActorSocketInvocation, ) -> Pin<Box<dyn Future<Output = Result<ActorSocketOutcome>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§