pub struct HandShakeFrame { /* private fields */ }Expand description
Abstraction for a Noise handshake frame.
Contains only the serialized payload with a fixed length and is only used during Noise
handshake process. Once the handshake is complete, regular Sv2 communication switches to
Sv2Frame for ongoing communication.
Implementations§
Source§impl HandShakeFrame
impl HandShakeFrame
Sourcepub fn get_payload_when_handshaking(&self) -> Vec<u8> ⓘ
pub fn get_payload_when_handshaking(&self) -> Vec<u8> ⓘ
Returns payload of HandShakeFrame as a Vec<u8>.
Sourcepub fn from_bytes(bytes: Slice) -> Result<Self, isize>
pub fn from_bytes(bytes: Slice) -> Result<Self, isize>
Builds a HandShakeFrame from raw bytes. Nothing is assumed or checked about the
correctness of the payload.
pub fn from_bytes_unchecked(bytes: Slice) -> Self
Trait Implementations§
Source§impl Debug for HandShakeFrame
impl Debug for HandShakeFrame
Source§impl<T, B> From<HandShakeFrame> for Frame<T, B>
impl<T, B> From<HandShakeFrame> for Frame<T, B>
Source§fn from(v: HandShakeFrame) -> Self
fn from(v: HandShakeFrame) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HandShakeFrame
impl RefUnwindSafe for HandShakeFrame
impl Send for HandShakeFrame
impl !Sync for HandShakeFrame
impl Unpin for HandShakeFrame
impl UnwindSafe for HandShakeFrame
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