Trait bip_peer::ManagedMessage
[−]
[src]
pub trait ManagedMessage { fn keep_alive() -> Self; fn is_keep_alive(&self) -> bool; }
Trait for giving PeerManager
message information it needs.
For any PeerProtocol
(or plain Codec
), that wants to be managed
by PeerManager
, it must ensure that it's message type implements
this trait so that we have the hooks necessary to manage the peer.
Required Methods
fn keep_alive() -> Self
Retrieve a keep alive message variant.
fn is_keep_alive(&self) -> bool
Whether or not this message is a keep alive message.
Implementors
impl<P> ManagedMessage for PeerWireProtocolMessage<P> where
P: PeerProtocol,