pub struct ChannelTransport<M> { /* private fields */ }Expand description
An in-memory NetworkTransport pair over std::sync::mpsc channels.
The engine’s built-in mock: the two ends of one link connection with
zero I/O, used for local play and tests. Dropping one end makes the
other report TransportError::Disconnected exactly like a closed
socket.
Implementations§
Source§impl<M> ChannelTransport<M>
impl<M> ChannelTransport<M>
Trait Implementations§
Source§impl<M> NetworkTransport<M> for ChannelTransport<M>
impl<M> NetworkTransport<M> for ChannelTransport<M>
Source§fn recv(&mut self) -> Result<M, TransportError>
fn recv(&mut self) -> Result<M, TransportError>
Block until a message arrives or the connection fails.
Auto Trait Implementations§
impl<M> !Sync for ChannelTransport<M>
impl<M> Freeze for ChannelTransport<M>
impl<M> RefUnwindSafe for ChannelTransport<M>
impl<M> Send for ChannelTransport<M>where
M: Send,
impl<M> Unpin for ChannelTransport<M>
impl<M> UnsafeUnpin for ChannelTransport<M>
impl<M> UnwindSafe for ChannelTransport<M>
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