Struct litep2p::yamux::Connection
source · pub struct Connection<T> { /* private fields */ }
Implementations§
source§impl<T: AsyncRead + AsyncWrite + Unpin> Connection<T>
impl<T: AsyncRead + AsyncWrite + Unpin> Connection<T>
pub fn new(socket: T, cfg: Config, mode: Mode) -> Self
sourcepub fn poll_new_outbound(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<Stream>>
pub fn poll_new_outbound( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Stream>>
Poll for a new outbound stream.
This function will fail if the current state does not allow opening new outbound streams.
Trait Implementations§
source§impl<T: Debug> Debug for Connection<T>
impl<T: Debug> Debug for Connection<T>
Auto Trait Implementations§
impl<T> !Freeze for Connection<T>
impl<T> !RefUnwindSafe for Connection<T>
impl<T> Send for Connection<T>where
T: Send,
impl<T> Sync for Connection<T>where
T: Sync,
impl<T> Unpin for Connection<T>where
T: Unpin,
impl<T> !UnwindSafe for Connection<T>
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