pub struct HandshakeJoiner { /* private fields */ }
Expand description
This works to reconstruct TLS handshake messages from individual TLS messages. It’s guaranteed that TLS messages output from this layer contain precisely one handshake payload.
Implementations§
source§impl HandshakeJoiner
impl HandshakeJoiner
sourcepub fn push(&mut self, msg: PlainMessage) -> Result<bool, JoinerError>
pub fn push(&mut self, msg: PlainMessage) -> Result<bool, JoinerError>
Take the message, and join/split it as needed.
Returns Err(JoinerError::Unwanted(msg))
if msg
’s type is not ContentType::Handshake
or
JoinerError::Decode
if a received payload has an advertised size larger than we accept.
Otherwise, yields a bool
to indicate whether the handshake is “aligned”: if the buffer currently
only contains complete payloads (that is, no incomplete message in the suffix).
Auto Trait Implementations§
impl RefUnwindSafe for HandshakeJoiner
impl Send for HandshakeJoiner
impl Sync for HandshakeJoiner
impl Unpin for HandshakeJoiner
impl UnwindSafe for HandshakeJoiner
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