Struct HandshakeMachine
pub struct HandshakeMachine<Stream> { /* private fields */ }Expand description
A generic handshake state machine.
Implementations§
§impl<Stream> HandshakeMachine<Stream>
impl<Stream> HandshakeMachine<Stream>
pub fn start_read(stream: Stream) -> HandshakeMachine<Stream>
pub fn start_read(stream: Stream) -> HandshakeMachine<Stream>
Start reading data from the peer.
pub fn start_write<D>(stream: Stream, data: D) -> HandshakeMachine<Stream>
pub fn start_write<D>(stream: Stream, data: D) -> HandshakeMachine<Stream>
Start writing data to the peer.
pub fn get_mut(&mut self) -> &mut Stream
pub fn get_mut(&mut self) -> &mut Stream
Returns a mutable reference to the inner stream.
§impl<Stream> HandshakeMachine<Stream>
impl<Stream> HandshakeMachine<Stream>
pub fn single_round<Obj>(self) -> Result<RoundResult<Obj, Stream>, Error>where
Obj: TryParse,
pub fn single_round<Obj>(self) -> Result<RoundResult<Obj, Stream>, Error>where
Obj: TryParse,
Perform a single handshake round.
Trait Implementations§
Auto Trait Implementations§
impl<Stream> Freeze for HandshakeMachine<Stream>where
Stream: Freeze,
impl<Stream> RefUnwindSafe for HandshakeMachine<Stream>where
Stream: RefUnwindSafe,
impl<Stream> Send for HandshakeMachine<Stream>where
Stream: Send,
impl<Stream> Sync for HandshakeMachine<Stream>where
Stream: Sync,
impl<Stream> Unpin for HandshakeMachine<Stream>where
Stream: Unpin,
impl<Stream> UnwindSafe for HandshakeMachine<Stream>where
Stream: UnwindSafe,
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