pub struct PingResponsePayload {
pub id: u64,
}
Expand description
Used to request/respond to ping. Used in an encrypted form. Request id is used for resistance against replay attacks.
Serialized form:
Ping Packet (request and response)
Packet type 0x01
for response.
Response ID must match ID of the request, otherwise ping is invalid.
Length | Contents |
---|---|
1 | 0x01 |
8 | Ping ID |
Serialized form should be put in the encrypted part of PingResponse
packet.
PingResponsePayload
can only be created as a response
to PingRequestPayload
.
Fields§
§id: u64
Ping id same as requested from PingRequest
Trait Implementations§
Source§impl Clone for PingResponsePayload
impl Clone for PingResponsePayload
Source§fn clone(&self) -> PingResponsePayload
fn clone(&self) -> PingResponsePayload
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 PingResponsePayload
impl Debug for PingResponsePayload
Source§impl FromBytes for PingResponsePayload
impl FromBytes for PingResponsePayload
Source§fn from_bytes(
i: &[u8],
) -> IResult<&[u8], PingResponsePayload, (&[u8], ErrorKind)>
fn from_bytes( i: &[u8], ) -> IResult<&[u8], PingResponsePayload, (&[u8], ErrorKind)>
Deserialize struct using
nom
from raw bytesSource§impl PartialEq for PingResponsePayload
impl PartialEq for PingResponsePayload
Source§impl ToBytes for PingResponsePayload
impl ToBytes for PingResponsePayload
impl Eq for PingResponsePayload
impl StructuralPartialEq for PingResponsePayload
Auto Trait Implementations§
impl Freeze for PingResponsePayload
impl RefUnwindSafe for PingResponsePayload
impl Send for PingResponsePayload
impl Sync for PingResponsePayload
impl Unpin for PingResponsePayload
impl UnwindSafe for PingResponsePayload
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