pub struct PayloadHeader {
pub timestamp: u32,
pub timestamp_echo: u32,
pub payload_length: u16,
}Available on crate feature
transport only.Expand description
Payload header (inside encrypted portion).
Wire format (10 bytes):
+------------------+--------------------+------------------+
| Timestamp | Timestamp Echo | Payload Length |
| 4 bytes (LE32) | 4 bytes (LE32) | 2 bytes (LE16) |
+------------------+--------------------+------------------+Fields§
§timestamp: u32Sender’s current time in ms since session start.
timestamp_echo: u32Most recent timestamp received from peer (0 if none).
payload_length: u16Length of the sync message that follows.
Implementations§
Trait Implementations§
Source§impl Clone for PayloadHeader
impl Clone for PayloadHeader
Source§fn clone(&self) -> PayloadHeader
fn clone(&self) -> PayloadHeader
Returns a duplicate 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 PayloadHeader
impl Debug for PayloadHeader
Source§impl PartialEq for PayloadHeader
impl PartialEq for PayloadHeader
impl Copy for PayloadHeader
impl Eq for PayloadHeader
impl StructuralPartialEq for PayloadHeader
Auto Trait Implementations§
impl Freeze for PayloadHeader
impl RefUnwindSafe for PayloadHeader
impl Send for PayloadHeader
impl Sync for PayloadHeader
impl Unpin for PayloadHeader
impl UnwindSafe for PayloadHeader
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