Struct quinn::generic::NewConnection[][src]

#[non_exhaustive]pub struct NewConnection<S> where
    S: Session
{ pub connection: Connection<S>, pub uni_streams: IncomingUniStreams<S>, pub bi_streams: IncomingBiStreams<S>, pub datagrams: Datagrams<S>, }

Components of a newly established connection

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 { connection, .. } = { new_connection };

You can also explicitly invoke Connection::close at any time.

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct {{ .. }} syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
connection: Connection<S>

Handle for interacting with the connection

uni_streams: IncomingUniStreams<S>

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<S>

Bidirectional streams initiated by the peer, in the order they were opened

datagrams: Datagrams<S>

Unordered, unreliable datagrams sent by the peer

Trait Implementations

impl<S: Debug> Debug for NewConnection<S> where
    S: Session
[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for NewConnection<S>

impl<S> Send for NewConnection<S>

impl<S> Sync for NewConnection<S>

impl<S> Unpin for NewConnection<S>

impl<S> UnwindSafe for NewConnection<S>

Blanket Implementations

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

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

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

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

impl<T> Instrument 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 = Infallible

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<V, T> VZip<V> for T where
    V: MultiLane<T>,