pub struct PendingConnection { /* private fields */ }Expand description
A connection that has been opened but not yet accepted.
The acceptor receives this and decides its fate by calling one of:
handle_with(handler)— run a Driver with this handler (common case)proxy_to(other_handle)— pipe messages to/from another connectioninto_handle()— take the raw ConnectionHandle for custom use
Implementations§
Source§impl PendingConnection
impl PendingConnection
Sourcepub fn handle_with(self, handler: impl Handler<DriverReplySink> + 'static)
pub fn handle_with(self, handler: impl Handler<DriverReplySink> + 'static)
Accept this connection and run a Driver with the given handler.
Sourcepub fn handle_with_client<C: FromVoxSession>(
self,
handler: impl Handler<DriverReplySink> + 'static,
) -> C
pub fn handle_with_client<C: FromVoxSession>( self, handler: impl Handler<DriverReplySink> + 'static, ) -> C
Accept this connection, run a Driver, and return a typed client for the peer.
Sourcepub fn proxy_to(self, other: ConnectionHandle)
pub fn proxy_to(self, other: ConnectionHandle)
Accept this connection and proxy all traffic to/from another connection.
Sourcepub fn into_handle(self) -> ConnectionHandle
pub fn into_handle(self) -> ConnectionHandle
Take the raw ConnectionHandle for custom use.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PendingConnection
impl !RefUnwindSafe for PendingConnection
impl Send for PendingConnection
impl Sync for PendingConnection
impl Unpin for PendingConnection
impl UnsafeUnpin for PendingConnection
impl !UnwindSafe for PendingConnection
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