#[non_exhaustive]pub struct TransportClose {
pub code: u64,
pub space: CodeSpace,
pub by_peer: bool,
pub reason: Vec<u8>,
}Expand description
How the QUIC connection under a session was closed, as quinn recorded it.
The same over QUIC and WebTransport: both read the close off the
quinn::Connection, so a transport-space code that wtransport keeps
private is still read here. A CLOSE_WEBTRANSPORT_SESSION capsule is not a
QUIC close; it reaches callers as TransportError::SessionClosed.
There is none for a connection that is still open, nor for a close with no code: a timeout, a stateless reset, this endpoint’s own application close.
Fields (Non-exhaustive)§
This struct is marked as 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.code: u64The close code.
space: CodeSpaceWhich space code is a number in.
by_peer: booltrue when the peer sent the close, false when this endpoint’s QUIC
stack detected a transport error and closed with it.
reason: Vec<u8>The reason phrase, as sent.
Implementations§
Trait Implementations§
Source§impl Clone for TransportClose
impl Clone for TransportClose
Source§impl Debug for TransportClose
impl Debug for TransportClose
impl Eq for TransportClose
Source§impl PartialEq for TransportClose
impl PartialEq for TransportClose
impl StructuralPartialEq for TransportClose
Auto Trait Implementations§
impl Forget for TransportClose
impl Freeze for TransportClose
impl Move for TransportClose
impl RefUnwindSafe for TransportClose
impl Send for TransportClose
impl Sync for TransportClose
impl Unpin for TransportClose
impl UnsafeUnpin for TransportClose
impl UnwindSafe for TransportClose
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