pub struct NeedsInput { /* private fields */ }Expand description
More data needs to be received to make progress.
Provide the data to Self::process().
Implementations§
Source§impl NeedsInput
impl NeedsInput
Sourcepub fn process(
self,
input: &mut dyn TlsInputBuffer,
output: &mut Vec<Vec<u8>>,
) -> Result<ServerHandshake, Error>
pub fn process( self, input: &mut dyn TlsInputBuffer, output: &mut Vec<Vec<u8>>, ) -> Result<ServerHandshake, Error>
Progress the handshake by receiving further data.
The data is obtained via input. Any output produced is appended to output and
should be sent to the peer (including if this function returns an error, because
the output may contain an alert.)
An error from this function is otherwise fatal to the connection, as it consumes
the NeedsInput object.
On success, this returns:
- a
ServerHandshake::NeedsInputif more data is required. - a
ServerHandshake::Acceptedif a wholeClientHellohas been received, requiring and a choice ofServerConfigis required to continue. - a
ServerHandshake::Completeif the handshake is complete.
Sourcepub fn into_buffered_connection(self) -> ServerConnection
pub fn into_buffered_connection(self) -> ServerConnection
Temporary escape hatch during migration to new API.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NeedsInput
impl !UnwindSafe for NeedsInput
impl Freeze for NeedsInput
impl Send for NeedsInput
impl Sync for NeedsInput
impl Unpin for NeedsInput
impl UnsafeUnpin for NeedsInput
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