Struct QuicConnection

Source
pub struct QuicConnection { /* private fields */ }
Expand description

Metadata about an established QUIC connection.

While this struct allows access to some facets of a QUIC connection, it notably does not represent the [quiche::Connection] itself. The crate handles most interactions with [quiche] internally in a worker task. Users can only access the connection directly via their ApplicationOverQuic implementation.

See the module-level docs for an overview of how a QUIC connection is handled internally.

Implementations§

Source§

impl QuicConnection

Source

pub fn local_addr(&self) -> SocketAddr

The local address this connection listens on.

Source

pub fn peer_addr(&self) -> SocketAddr

The remote address for this connection.

Source

pub fn audit_log_stats(&self) -> &Arc<QuicAuditStats>

A handle to the QuicAuditStats for this connection.

§Note

These stats are updated during the lifetime of the connection. The getter exists to grab a handle early on, which can then be stowed away and read out after the connection has closed.

Source

pub fn stats(&self) -> &Arc<Mutex<QuicConnectionStats>>

A handle to the QuicConnectionStats for this connection.

§Note

Initially, these stats represent the state when the [quiche::Connection] was created. They are updated when the connection is closed, so this getter exists primarily to grab a handle early on.

Source

pub fn scid(&self) -> &ConnectionId<'static>

The QUIC source connection ID used by this connection.

Trait Implementations§

Source§

impl AsSocketStats for QuicConnection

Source§

impl ShutdownConnection for QuicConnection

Source§

fn poll_shutdown(&mut self, _cx: &mut Context<'_>) -> Poll<Result<()>>

Initiates or attempts to shut down this writer, returning success when the I/O connection has completely shut down. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ShutdownConnectionExt for T

Source§

fn shutdown_connection(&mut self) -> impl Future<Output = Result<(), Error>>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V

§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,