pub struct StdFrontend<T> { /* private fields */ }Expand description
Active std frontend adapter.
Implementations§
Source§impl<T> StdFrontend<T>
impl<T> StdFrontend<T>
Sourcepub fn with_config(io: T, config: EngineConfig) -> Self
pub fn with_config(io: T, config: EngineConfig) -> Self
Creates a frontend adapter using config.
Sourcepub fn peer_state(&self) -> PeerState
pub fn peer_state(&self) -> PeerState
Returns the endpoint peer state.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the adapter and returns the owned IO object.
Sourcepub fn disconnect(&mut self)
pub fn disconnect(&mut self)
Drops the active frontend session.
Sourcepub fn receive_available(&mut self) -> Result<usize>
pub fn receive_available(&mut self) -> Result<usize>
Reads currently available stream bytes and feeds them into MSRT.
This method is best used with nonblocking IO. WouldBlock is treated as
no input.
Sourcepub fn poll(&mut self) -> Result<AdapterEvent>
pub fn poll(&mut self) -> Result<AdapterEvent>
Polls one adapter event and writes any pending transmit bytes.
Sourcepub fn tick(&mut self) -> Result<AdapterEvent>
pub fn tick(&mut self) -> Result<AdapterEvent>
Runs receive_available followed by poll.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for StdFrontend<T>where
T: Freeze,
impl<T> RefUnwindSafe for StdFrontend<T>where
T: RefUnwindSafe,
impl<T> Send for StdFrontend<T>where
T: Send,
impl<T> Sync for StdFrontend<T>where
T: Sync,
impl<T> Unpin for StdFrontend<T>where
T: Unpin,
impl<T> UnsafeUnpin for StdFrontend<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for StdFrontend<T>where
T: 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