pub struct ProtocolMessage {
pub seq: SequenceNumber,
pub content: ProtocolMessageContent,
}
Expand description
Base class of requests, responses, and events.
Fields§
§seq: SequenceNumber
Sequence number (also known as message ID). For protocol messages of type ‘request’ this ID can be used to cancel the request.
content: ProtocolMessageContent
Implementations§
Source§impl ProtocolMessage
impl ProtocolMessage
pub fn new( seq: SequenceNumber, content: impl Into<ProtocolMessageContent>, ) -> ProtocolMessage
Trait Implementations§
Source§impl Clone for ProtocolMessage
impl Clone for ProtocolMessage
Source§fn clone(&self) -> ProtocolMessage
fn clone(&self) -> ProtocolMessage
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ProtocolMessage
impl Debug for ProtocolMessage
Source§impl<'de> Deserialize<'de> for ProtocolMessage
impl<'de> Deserialize<'de> for ProtocolMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ProtocolMessage
impl Display for ProtocolMessage
Source§impl PartialEq for ProtocolMessage
impl PartialEq for ProtocolMessage
Source§impl Serialize for ProtocolMessage
impl Serialize for ProtocolMessage
impl StructuralPartialEq for ProtocolMessage
Auto Trait Implementations§
impl Freeze for ProtocolMessage
impl RefUnwindSafe for ProtocolMessage
impl Send for ProtocolMessage
impl Sync for ProtocolMessage
impl Unpin for ProtocolMessage
impl UnwindSafe for ProtocolMessage
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