pub struct PeerFrame;Expand description
The frame of write_frame and read_frame: the
message’s length as four big-endian bytes, then the message; an empty message is a message.
It is [LengthPrefix::u32_be] by another name, so a StreamChannel on PeerFrame and a
handshake driven by drive_stream read each other’s bytes. The bound on a
message is the channel’s (1 MiB by default, the number MAX_MESSAGE is), not this type’s.
Implementations§
Trait Implementations§
Source§impl Codec for PeerFrame
impl Codec for PeerFrame
impl Copy for PeerFrame
impl Eq for PeerFrame
impl StructuralPartialEq for PeerFrame
Auto Trait Implementations§
impl Freeze for PeerFrame
impl RefUnwindSafe for PeerFrame
impl Send for PeerFrame
impl Sync for PeerFrame
impl Unpin for PeerFrame
impl UnsafeUnpin for PeerFrame
impl UnwindSafe for PeerFrame
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