pub struct PayloadHeader {
pub version: u8,
pub kind: PayloadKind,
pub sync_id: SyncId,
pub sender: DeviceId,
}Expand description
The plaintext header of a payload, unauthenticated.
Produced by Payload::peek. Every field comes from the plaintext header, so it is only
a claim; the one legitimate use is looking the sync_id up in the replay log. See
Payload::peek.
Fields§
§version: u8Payload format version. Always equal to FORMAT_VERSION (other versions are
already rejected inside peek).
kind: PayloadKindWhat this payload asks the peer to do.
sync_id: SyncIdPayload identifier, used to consult the replay log.
sender: DeviceIdThe identity the sender claims.
As with Payload::sender, it is in the AAD and therefore trustworthy after
Payload::open; at the peek stage it is still only a claim.
Trait Implementations§
Source§impl Clone for PayloadHeader
impl Clone for PayloadHeader
impl Copy for PayloadHeader
Source§impl Debug for PayloadHeader
impl Debug for PayloadHeader
impl Eq for PayloadHeader
Source§impl PartialEq for PayloadHeader
impl PartialEq 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 UnsafeUnpin 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