Trait rabble::ConnectionHandler
[−]
[src]
pub trait ConnectionHandler: Sized { type Msg: Encodable + Decodable + Debug + Clone; type ClientMsg: Debug; fn new(pid: Pid, id: u64) -> Self; fn handle_envelope(
&mut self,
_: Envelope<Self::Msg>
) -> &mut Vec<ConnectionMsg<Self>>; fn handle_network_msg(
&mut self,
_: Self::ClientMsg
) -> &mut Vec<ConnectionMsg<Self>>; }
Implement this for a specific connection handler
Associated Types
Required Methods
fn new(pid: Pid, id: u64) -> Self
fn handle_envelope(
&mut self,
_: Envelope<Self::Msg>
) -> &mut Vec<ConnectionMsg<Self>>
&mut self,
_: Envelope<Self::Msg>
) -> &mut Vec<ConnectionMsg<Self>>
fn handle_network_msg(
&mut self,
_: Self::ClientMsg
) -> &mut Vec<ConnectionMsg<Self>>
&mut self,
_: Self::ClientMsg
) -> &mut Vec<ConnectionMsg<Self>>