Skip to main content

RelayConnectionJob

Trait RelayConnectionJob 

Source
pub trait RelayConnectionJob:
    Send
    + Sync
    + 'static {
    // Required methods
    fn run<'a>(
        self: Box<Self>,
        client: &'a mut RelayClient,
    ) -> BoxFuture<'a, ()>;
    fn refuse(self: Box<Self>, error: Error);
}
Expand description

Work run on a session actor’s own relay connection, in turn with the actor’s other relay traffic. A periodic exchange such as credential sync uses this instead of opening a connection of its own to every worker.

Required Methods§

Source

fn run<'a>(self: Box<Self>, client: &'a mut RelayClient) -> BoxFuture<'a, ()>

Source

fn refuse(self: Box<Self>, error: Error)

The actor did not run the job; error says why.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§