pub struct TlsRecordDeframer { /* private fields */ }Expand description
Buffers incoming TLS octets and yields complete record packets (header + payload).
Supports partial reads from blocking or async transports.
Implementations§
Source§impl TlsRecordDeframer
impl TlsRecordDeframer
Sourcepub fn noxtls_new() -> Self
pub fn noxtls_new() -> Self
Creates an empty deframer buffer.
Sourcepub fn push(&mut self, chunk: &[u8])
pub fn push(&mut self, chunk: &[u8])
Appends newly read transport bytes to the internal buffer.
Sourcepub fn pop_packet(&mut self) -> Result<Option<Vec<u8>>>
pub fn pop_packet(&mut self) -> Result<Option<Vec<u8>>>
Returns one complete TLS record packet when 5 + length bytes are buffered.
§Errors
Returns Error::InvalidLength when the length field exceeds TLS_MAX_RECORD_PAYLOAD_LEN.
Sourcepub fn buffered_len(&self) -> usize
pub fn buffered_len(&self) -> usize
Returns the number of bytes currently buffered.
Trait Implementations§
Source§impl Clone for TlsRecordDeframer
impl Clone for TlsRecordDeframer
Source§fn clone(&self) -> TlsRecordDeframer
fn clone(&self) -> TlsRecordDeframer
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 TlsRecordDeframer
impl Debug for TlsRecordDeframer
Source§impl Default for TlsRecordDeframer
impl Default for TlsRecordDeframer
Source§fn default() -> TlsRecordDeframer
fn default() -> TlsRecordDeframer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TlsRecordDeframer
impl RefUnwindSafe for TlsRecordDeframer
impl Send for TlsRecordDeframer
impl Sync for TlsRecordDeframer
impl Unpin for TlsRecordDeframer
impl UnsafeUnpin for TlsRecordDeframer
impl UnwindSafe for TlsRecordDeframer
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