Struct holochain::prelude::kitsune_p2p::dependencies::kitsune_p2p_types::dependencies::rustls::internal::msgs::hsjoiner::HandshakeJoiner
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§
§impl HandshakeJoiner
impl HandshakeJoiner
pub fn new() -> HandshakeJoiner
pub fn new() -> HandshakeJoiner
Make a new HandshakeJoiner.
pub 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).
pub fn pop(&mut self) -> Result<Option<Message>, JoinerError>
pub fn pop(&mut self) -> Result<Option<Message>, JoinerError>
Parse the first received message out of the buffer.
Returns Ok(None)
if we don’t have a complete message in the buffer, or Err
if we
fail to parse the first message in the buffer.
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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.