[][src]Struct quinn::NewConnection

pub struct NewConnection {
    pub driver: ConnectionDriver,
    pub connection: Connection,
    pub uni_streams: IncomingUniStreams,
    pub bi_streams: IncomingBiStreams,
    pub datagrams: Datagrams,
    // some fields omitted
}

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

impl Debug for NewConnection[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,