pub trait Lock<T>: 'static + Send + Sync {
    type Error;
    fn new(value: T) -> Self;
fn read<F: FnOnce(&T) -> R, R>(&self, f: F) -> Result<R, Self::Error>;
fn write<F: FnOnce(&mut T) -> R, R>(&self, f: F) -> Result<R, Self::Error>; }
Expand description

A lock that synchronizes connection state between the QUIC endpoint thread and application

Associated Types

Required methods

Creates a connection lock

Obtains a read-only reference to the inner connection

Obtains a mutable reference to the inner connection

Implementations on Foreign Types

Implementors