pub trait Handshake {
type Output;
type Error: Error + Send + Sync + 'static;
// Required methods
fn framing(&self) -> Framing;
fn receive(&mut self, input: &[u8]) -> Result<(), Self::Error>;
fn transmit(&mut self) -> Result<Option<Vec<u8>>, Self::Error>;
fn is_complete(&self) -> bool;
fn finish(self) -> Result<Established<Self::Output>, Self::Error>;
}Expand description
One authentication exchange, driven by the caller.
Required Associated Types§
Required Methods§
Sourcefn transmit(&mut self) -> Result<Option<Vec<u8>>, Self::Error>
fn transmit(&mut self) -> Result<Option<Vec<u8>>, Self::Error>
The next thing to send to the peer, or None when there is nothing to send until more
input arrives. Call until None.
§Errors
When the handshake cannot continue.
Sourcefn is_complete(&self) -> bool
fn is_complete(&self) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".