pub struct ConnectedPeer { /* private fields */ }Expand description
A move-only connected participant over host-established byte IO.
Implementations§
Source§impl ConnectedPeer
impl ConnectedPeer
Sourcepub fn from_duplex<IO>(
role: CarrierRole,
io: IO,
options: ConnectedPeerOptions,
) -> Result<Self>
pub fn from_duplex<IO>( role: CarrierRole, io: IO, options: ConnectedPeerOptions, ) -> Result<Self>
Adopt one nonblocking Mio source as a move-only connected peer.
io must already be configured for nonblocking operation.
Sourcepub fn from_split<R, W>(
role: CarrierRole,
reader: R,
writer: W,
options: ConnectedPeerOptions,
) -> Result<Self>
pub fn from_split<R, W>( role: CarrierRole, reader: R, writer: W, options: ConnectedPeerOptions, ) -> Result<Self>
Adopt independent nonblocking Mio input and output sources.
reader is peer-to-local and writer is local-to-peer. Both sources
must already be configured for nonblocking operation.
Trait Implementations§
Source§impl From<ConnectedPeer> for Participant
impl From<ConnectedPeer> for Participant
Source§fn from(value: ConnectedPeer) -> Self
fn from(value: ConnectedPeer) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ConnectedPeer
impl !Send for ConnectedPeer
impl !Sync for ConnectedPeer
impl !UnwindSafe for ConnectedPeer
impl Freeze for ConnectedPeer
impl Unpin for ConnectedPeer
impl UnsafeUnpin for ConnectedPeer
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