Struct quinn::generic::NewConnection [−][src]
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)
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]
S: Session,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[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 = Infallible
The type returned in the event of a conversion error.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,