pub struct Connection<const N: usize, P: ConnectionPeer> { /* private fields */ }
Implementations§
Source§impl<const N: usize, P: ConnectionPeer> Connection<N, P>
impl<const N: usize, P: ConnectionPeer> Connection<N, P>
pub fn new( cid: ConnectionId<P::Id>, peer: Peer<P>, config: ConnectionConfig, syn: Option<Packet>, connected: Sender<Result<()>>, socket_events: UnboundedSender<SocketEvent<P>>, reads: UnboundedSender<Read>, ) -> Self
pub async fn event_loop( &mut self, stream_events: UnboundedReceiver<StreamEvent>, writes: UnboundedReceiver<Write>, shutdown: Receiver<()>, ) -> Result<()>
Auto Trait Implementations§
impl<const N: usize, P> !Freeze for Connection<N, P>
impl<const N: usize, P> !RefUnwindSafe for Connection<N, P>
impl<const N: usize, P> Send for Connection<N, P>
impl<const N: usize, P> Sync for Connection<N, P>
impl<const N: usize, P> Unpin for Connection<N, P>
impl<const N: usize, P> !UnwindSafe for Connection<N, P>
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