Skip to main content

WorkerInstances

Trait WorkerInstances 

Source
pub trait WorkerInstances {
    // Required methods
    fn count(&self) -> usize;
    fn post(&mut self, instance: usize, request: Vec<u8>);

    // Provided method
    fn replace(&mut self, _instance: usize) -> bool { ... }
}
Expand description

The worker instances a RemoteWorkers sends its frames to. Their replies come back through the ReplySink the transport gave whoever created them.

Required Methods§

Source

fn count(&self) -> usize

How many there are; frames go to 0..count().

Source

fn post(&mut self, instance: usize, request: Vec<u8>)

Sends a frame to the host of instance instance.

Provided Methods§

Source

fn replace(&mut self, _instance: usize) -> bool

Puts a new instance, with a new host, in the place of instance, which was lost; its replies no longer arrive. Returns whether it could.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§