pub trait Process: Sender + AsRef<Channel> {
fn process_one(&self, msg: Message);
fn process_all(&self) { ... }
}
Expand description
Internal helper trait, implemented for connections that process incoming messages.
Required Methods
sourcefn process_one(&self, msg: Message)
fn process_one(&self, msg: Message)
Dispatches a message.
Provided Methods
sourcefn process_all(&self)
fn process_all(&self)
Dispatches all pending messages, without blocking.
This is usually called from the reactor only, after read_write. Despite this taking &self and not “&mut self”, it is a logic error to call this recursively or from more than one thread at a time.