pub struct MessageDeframer { /* private fields */ }
Expand description
This deframer works to reconstruct TLS messages from a stream of arbitrary-sized reads.
It buffers incoming data into a Vec
through read()
, and returns messages through pop()
.
QUIC connections will call push()
to append handshake payload data directly.
Implementations§
source§impl MessageDeframer
impl MessageDeframer
sourcepub fn pop(
&mut self,
record_layer: &mut RecordLayer,
negotiated_version: Option<ProtocolVersion>,
buffer: &mut DeframerSliceBuffer<'_>,
) -> Result<Option<Deframed>, Error>
pub fn pop( &mut self, record_layer: &mut RecordLayer, negotiated_version: Option<ProtocolVersion>, buffer: &mut DeframerSliceBuffer<'_>, ) -> Result<Option<Deframed>, Error>
Return any decrypted messages that the deframer has been able to parse.
Returns an Error
if the deframer failed to parse some message contents or if decryption
failed, Ok(None)
if no full message is buffered or if trial decryption failed, and
Ok(Some(_))
if a valid message was found and decrypted successfully.
Trait Implementations§
source§impl Default for MessageDeframer
impl Default for MessageDeframer
source§fn default() -> MessageDeframer
fn default() -> MessageDeframer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MessageDeframer
impl !RefUnwindSafe for MessageDeframer
impl Send for MessageDeframer
impl Sync for MessageDeframer
impl Unpin for MessageDeframer
impl !UnwindSafe for MessageDeframer
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