Skip to main content

ControllerMessageHandler

Trait ControllerMessageHandler 

Source
pub trait ControllerMessageHandler:
    Actor
    + Send
    + Sync {
    // Required methods
    fn attach<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        cx: &'life1 Context<'_, Self>,
        client_actor: ActorRef<ClientActor>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn node<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        cx: &'life1 Context<'_, Self>,
        seq: Seq,
        defs: Vec<Ref>,
        uses: Vec<Ref>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn drop_refs<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        cx: &'life1 Context<'_, Self>,
        refs: Vec<Ref>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn send<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        cx: &'life1 Context<'_, Self>,
        ranks: Ranks,
        message: Any,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn remote_function_failed<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        cx: &'life1 Context<'_, Self>,
        seq: Seq,
        error: WorkerError,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn status<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        cx: &'life1 Context<'_, Self>,
        seq: Seq,
        worker_actor_id: ActorAddr,
        controller: bool,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn fetch_result<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        cx: &'life1 Context<'_, Self>,
        seq: Seq,
        value: Result<Any, WorkerError>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_first_incomplete_seqs_unit_tests_only<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        cx: &'life1 Context<'_, Self>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Seq>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn check_supervision<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        cx: &'life1 Context<'_, Self>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn debugger_message<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        cx: &'life1 Context<'_, Self>,
        debugger_actor_id: ActorAddr,
        action: DebuggerAction,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn handle<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        cx: &'life1 Context<'_, Self>,
        message: ControllerMessage,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

The custom handler trait for this message type.

Required Methods§

Source

fn attach<'life0, 'life1, 'async_trait>( &'life0 mut self, cx: &'life1 Context<'_, Self>, client_actor: ActorRef<ClientActor>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The generated handler method for this enum variant.

Source

fn node<'life0, 'life1, 'async_trait>( &'life0 mut self, cx: &'life1 Context<'_, Self>, seq: Seq, defs: Vec<Ref>, uses: Vec<Ref>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The generated handler method for this enum variant.

Source

fn drop_refs<'life0, 'life1, 'async_trait>( &'life0 mut self, cx: &'life1 Context<'_, Self>, refs: Vec<Ref>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The generated handler method for this enum variant.

Source

fn send<'life0, 'life1, 'async_trait>( &'life0 mut self, cx: &'life1 Context<'_, Self>, ranks: Ranks, message: Any, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The generated handler method for this enum variant.

Source

fn remote_function_failed<'life0, 'life1, 'async_trait>( &'life0 mut self, cx: &'life1 Context<'_, Self>, seq: Seq, error: WorkerError, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The generated handler method for this enum variant.

Source

fn status<'life0, 'life1, 'async_trait>( &'life0 mut self, cx: &'life1 Context<'_, Self>, seq: Seq, worker_actor_id: ActorAddr, controller: bool, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The generated handler method for this enum variant.

Source

fn fetch_result<'life0, 'life1, 'async_trait>( &'life0 mut self, cx: &'life1 Context<'_, Self>, seq: Seq, value: Result<Any, WorkerError>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The generated handler method for this enum variant.

Source

fn get_first_incomplete_seqs_unit_tests_only<'life0, 'life1, 'async_trait>( &'life0 mut self, cx: &'life1 Context<'_, Self>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Seq>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The generated handler method for this enum variant.

Source

fn check_supervision<'life0, 'life1, 'async_trait>( &'life0 mut self, cx: &'life1 Context<'_, Self>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The generated handler method for this enum variant.

Source

fn debugger_message<'life0, 'life1, 'async_trait>( &'life0 mut self, cx: &'life1 Context<'_, Self>, debugger_actor_id: ActorAddr, action: DebuggerAction, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The generated handler method for this enum variant.

Provided Methods§

Source

fn handle<'life0, 'life1, 'async_trait>( &'life0 mut self, cx: &'life1 Context<'_, Self>, message: ControllerMessage, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle the next message.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§