pub enum Message {
Show 24 variants
CompressedGzip(Bytes),
Ping(Ping),
Pong(Pong),
Version(Version),
PeerList(PeerList),
GetStateSummaryFrontier(GetStateSummaryFrontier),
StateSummaryFrontier(StateSummaryFrontier),
GetAcceptedStateSummary(GetAcceptedStateSummary),
AcceptedStateSummary(AcceptedStateSummary),
GetAcceptedFrontier(GetAcceptedFrontier),
AcceptedFrontier(AcceptedFrontier),
GetAccepted(GetAccepted),
Accepted(Accepted),
GetAncestors(GetAncestors),
Ancestors(Ancestors),
Get(Get),
Put(Put),
PushQuery(PushQuery),
PullQuery(PullQuery),
Chits(Chits),
AppRequest(AppRequest),
AppResponse(AppResponse),
AppGossip(AppGossip),
PeerListAck(PeerListAck),
}
Expand description
NOTES Use “oneof” for each message type and set rest to null if not used. That is because when the compression is enabled, we don’t want to include uncompressed fields.
Variants§
CompressedGzip(Bytes)
Gzip-compressed bytes of a “p2p.Message” whose “oneof” “message” field is NOT compressed_* BUT one of the message types (e.g. ping, pong, etc.). This field is only set if the message type supports compression.
Ping(Ping)
Network messages:
Pong(Pong)
Version(Version)
PeerList(PeerList)
GetStateSummaryFrontier(GetStateSummaryFrontier)
State-sync messages:
StateSummaryFrontier(StateSummaryFrontier)
GetAcceptedStateSummary(GetAcceptedStateSummary)
AcceptedStateSummary(AcceptedStateSummary)
GetAcceptedFrontier(GetAcceptedFrontier)
Bootstrapping messages:
AcceptedFrontier(AcceptedFrontier)
GetAccepted(GetAccepted)
Accepted(Accepted)
GetAncestors(GetAncestors)
Ancestors(Ancestors)
Get(Get)
Consensus messages:
Put(Put)
PushQuery(PushQuery)
PullQuery(PullQuery)
Chits(Chits)
AppRequest(AppRequest)
App messages:
AppResponse(AppResponse)
AppGossip(AppGossip)
PeerListAck(PeerListAck)
Implementations§
source§impl Message
impl Message
sourcepub fn merge<B>(
field: &mut Option<Message>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError>where
B: Buf,
pub fn merge<B>( field: &mut Option<Message>, tag: u32, wire_type: WireType, buf: &mut B, ctx: DecodeContext ) -> Result<(), DecodeError>where B: Buf,
Decodes an instance of the message from a buffer, and merges it into self.
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
source§impl PartialEq<Message> for Message
impl PartialEq<Message> for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request