pub struct PongResponse {
pub ping_id: u64,
}
Expand description
Sent by both client and server, both will respond.
The server should respond to ping packets with pong packets with the same ping_id
as was in the ping packet. The server should check that each pong packet contains
the same ping_id
as was in the ping, if not the pong packet must be ignored.
Serialized form:
Length | Content |
---|---|
1 | 0x05 |
8 | ping_id in BigEndian |
Fields§
§ping_id: u64
The id of ping to respond
Trait Implementations§
Source§impl Clone for PongResponse
impl Clone for PongResponse
Source§fn clone(&self) -> PongResponse
fn clone(&self) -> PongResponse
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 PongResponse
impl Debug for PongResponse
Source§impl FromBytes for PongResponse
impl FromBytes for PongResponse
Source§fn from_bytes(i: &[u8]) -> IResult<&[u8], PongResponse, (&[u8], ErrorKind)>
fn from_bytes(i: &[u8]) -> IResult<&[u8], PongResponse, (&[u8], ErrorKind)>
Deserialize struct using
nom
from raw bytesSource§impl PartialEq for PongResponse
impl PartialEq for PongResponse
Source§impl ToBytes for PongResponse
impl ToBytes for PongResponse
impl StructuralPartialEq for PongResponse
Auto Trait Implementations§
impl Freeze for PongResponse
impl RefUnwindSafe for PongResponse
impl Send for PongResponse
impl Sync for PongResponse
impl Unpin for PongResponse
impl UnwindSafe for PongResponse
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