pub struct ConnectedPeer { /* private fields */ }Expand description
A move-only connected participant over host-established raw ILTP 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 an established duplex ILTP byte stream as a move-only peer.
The host completes transport establishment and drains its output before adoption. The stream’s flush completes once it owns all preceding output within bounded buffering; shutdown settles that output or fails.
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 established independent ILTP input and output halves.
reader is peer-to-local input and writer is local-to-peer output.
The writer’s flush completes once it owns all preceding output within
bounded buffering; shutdown settles that output or fails.
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 !Sync for ConnectedPeer
impl !UnwindSafe for ConnectedPeer
impl Freeze for ConnectedPeer
impl Send 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