pub struct Finished<'b, O, P: ReadPrecision> {
buffer: &'b mut Buffer<P>,
output: O,
}
proxy-handshake
or client-handshake
only.Expand description
A completed handshake
Represents:
Handshake::Output
, a value representing the meaning of the completed protocol exchange.- Possibly, some data which was received, but didn’t form part of the protocol.
Fields§
§buffer: &'b mut Buffer<P>
The buffer
output: O
Details of the completed handshake:
Implementations§
Source§impl<'b, O> Finished<'b, O, PreciseReads>
impl<'b, O> Finished<'b, O, PreciseReads>
Sourcepub fn into_output(self) -> Result<O, Bug>
pub fn into_output(self) -> Result<O, Bug>
Return (just) the output of the completed handshake
Available only if the Buffer
was constructed with Buffer::new_precise()
(or equivalent).
Source§impl<'b, O, P: ReadPrecision> Finished<'b, O, P>
impl<'b, O, P: ReadPrecision> Finished<'b, O, P>
Sourcepub fn into_output_and_slice(self) -> (O, &'b [u8])
pub fn into_output_and_slice(self) -> (O, &'b [u8])
Return the output, and the following already-read data as a slice
(After callin gthis, the following already-read data
will no longer be in the Buffer
.)
Sourcepub fn into_output_and_vec(self) -> (O, Vec<u8>)
pub fn into_output_and_vec(self) -> (O, Vec<u8>)
Return the output, and the following already-read data as a Vec
The Vec
is quite likely to have a considerably larger capacity than contents.
(Its capacity is usually the original buffer size, when the Buffer
was created.)
The Buffer
should not be discarded after calling this;
it will not be usable.
Sourcepub fn into_output_forbid_pipelining(self) -> Result<O, Error>
pub fn into_output_forbid_pipelining(self) -> Result<O, Error>
Return the output of the completed handshake, declaring any readahead a protocol error
This function is appropriate when the peer is not supposed to send data
until the handshake is complete.
If data did arrive before then, and was read, we call it a protocol error,
Error::ForbiddenPipelining
.
Trait Implementations§
Auto Trait Implementations§
impl<'b, O, P> Freeze for Finished<'b, O, P>where
O: Freeze,
impl<'b, O, P> RefUnwindSafe for Finished<'b, O, P>where
O: RefUnwindSafe,
P: RefUnwindSafe,
impl<'b, O, P> Send for Finished<'b, O, P>
impl<'b, O, P> Sync for Finished<'b, O, P>
impl<'b, O, P> Unpin for Finished<'b, O, P>where
O: Unpin,
impl<'b, O, P> !UnwindSafe for Finished<'b, O, P>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more