pub enum Message {
Show 23 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),
}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)
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§
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl !Freeze for Message
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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