fuel_core_p2p::codecs

Trait NetworkCodec

Source
pub trait NetworkCodec:
    GossipsubCodec<RequestMessage = GossipsubBroadcastRequest, ResponseMessage = GossipsubMessage>
    + Codec<Request = RequestMessage, Response = ResponseMessage>
    + Clone
    + Send
    + 'static {
    // Required method
    fn get_req_res_protocol(&self) -> <Self as Codec>::Protocol;
}
Expand description

Main Codec trait Needs to be implemented and provided to FuelBehaviour

Required Methods§

Source

fn get_req_res_protocol(&self) -> <Self as Codec>::Protocol

Returns RequestResponse’s Protocol Needed for initialization of RequestResponse Behaviour

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§