pub struct IntegrityCodec { /* private fields */ }
Expand description
A codec for frames delimited by a header specifying their lengths, sequence number and checksums.
The data integrity is verified using the CRC32 checksum.
Implementations§
Source§impl IntegrityCodec
impl IntegrityCodec
Sourcepub fn max_packet_size(&self) -> u32
pub fn max_packet_size(&self) -> u32
Returns the maximum packet size.
This is the largest size this codec will accept from the wire. Larger packets will be rejected.
Sourcepub fn set_max_packet_size(&mut self, max_packet_size: u32)
pub fn set_max_packet_size(&mut self, max_packet_size: u32)
Sets the maximum packet size.
This is the largest size this codec will accept from and send to the wire. Larger packets will be rejected.
Trait Implementations§
Source§impl Clone for IntegrityCodec
impl Clone for IntegrityCodec
Source§fn clone(&self) -> IntegrityCodec
fn clone(&self) -> IntegrityCodec
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 IntegrityCodec
impl Debug for IntegrityCodec
Source§impl Decoder for IntegrityCodec
impl Decoder for IntegrityCodec
Source§fn decode(&mut self, src: &mut BytesMut) -> Result<Option<BytesMut>>
fn decode(&mut self, src: &mut BytesMut) -> Result<Option<BytesMut>>
Attempts to decode a frame from the provided buffer of bytes. Read more
Source§impl Default for IntegrityCodec
impl Default for IntegrityCodec
Auto Trait Implementations§
impl Freeze for IntegrityCodec
impl RefUnwindSafe for IntegrityCodec
impl Send for IntegrityCodec
impl Sync for IntegrityCodec
impl Unpin for IntegrityCodec
impl UnwindSafe for IntegrityCodec
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