pub struct TransportFrame {
pub frame_type: FrameType,
pub nonce: [u8; 12],
pub payload: Bytes,
pub tag: [u8; 16],
}Expand description
The outermost frame on the wire between directly connected peers.
Layout:
- magic: u16 (0x504D)
- version: u8
- frame_type: u8
- length: u32 (payload length)
- nonce: [u8; 12]
- payload: [u8; length] (encrypted)
- tag: [u8; 16]
Fields§
§frame_type: FrameTypePayload discriminator for payload.
nonce: [u8; 12]AES-GCM nonce used for the encrypted payload.
payload: BytesEncrypted inner frame bytes.
tag: [u8; 16]Authentication tag for the encrypted payload.
Trait Implementations§
Source§impl Clone for TransportFrame
impl Clone for TransportFrame
Source§fn clone(&self) -> TransportFrame
fn clone(&self) -> TransportFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TransportFrame
impl Debug for TransportFrame
Source§impl FrameCodec for TransportFrame
impl FrameCodec for TransportFrame
Source§impl PartialEq for TransportFrame
impl PartialEq for TransportFrame
Source§fn eq(&self, other: &TransportFrame) -> bool
fn eq(&self, other: &TransportFrame) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for TransportFrame
impl StructuralPartialEq for TransportFrame
Auto Trait Implementations§
impl !Freeze for TransportFrame
impl RefUnwindSafe for TransportFrame
impl Send for TransportFrame
impl Sync for TransportFrame
impl Unpin for TransportFrame
impl UnsafeUnpin for TransportFrame
impl UnwindSafe for TransportFrame
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