Trait P2PNetworkClient

Source
pub trait P2PNetworkClient: DynClone {
    // Required method
    fn attempt_send<MsgT, SerializerT>(
        &mut self,
        message: MsgT,
        serializer: SerializerT,
        node: impl Into<String>,
    ) -> P2PNetworkResult<()>
       where MsgT: ActorMsg,
             SerializerT: Fn(MsgT) -> P2PNetworkResult<Vec<u8>> + Sync + 'static;
}
Expand description

A P2PNetworkClient allows sending messages to other nodes in a P2P network.

Required Methods§

Source

fn attempt_send<MsgT, SerializerT>( &mut self, message: MsgT, serializer: SerializerT, node: impl Into<String>, ) -> P2PNetworkResult<()>
where MsgT: ActorMsg, SerializerT: Fn(MsgT) -> P2PNetworkResult<Vec<u8>> + Sync + 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§