[−][src]Struct quinn::NewConnection
Components of a newly established connection
Ensure driver
runs or the connection will not work.
All fields of this struct, in addition to any other handles constructed later, must be dropped
for a connection to be implicitly closed. If the NewConnection
is stored in a long-lived
variable, moving individual fields won't cause remaining unused fields to be dropped, even with
pattern-matching. The easiest way to ensure unused fields are dropped is to pattern-match on the
variable wrapped in brackets, which forces the entire NewConnection
to be moved out of the
variable and into a temporary, ensuring all unused fields are dropped at the end of the
statement:
let NewConnection { driver, connection, .. } = { new_connection };
You can also explicitly invoke Connection::close
at any time.
Fields
driver: ConnectionDriver
The future responsible for handling I/O on the connection
connection: Connection
Handle for interacting with the connection
uni_streams: IncomingUniStreams
Unidirectional streams initiated by the peer, in the order they were opened
Note that data for separate streams may be delivered in any order. In other words, reading
from streams in the order they're opened is not optimal. See IncomingUniStreams
for
details.
bi_streams: IncomingBiStreams
Bidirectional streams initiated by the peer, in the order they were opened
datagrams: Datagrams
Unordered, unreliable datagrams sent by the peer
Trait Implementations
Auto Trait Implementations
impl Send for NewConnection
impl Sync for NewConnection
impl Unpin for NewConnection
impl UnwindSafe for NewConnection
impl RefUnwindSafe for NewConnection
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,