Trait s2n_quic_transport::connection::Lock
source · [−]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
Obtains a read-only reference to the inner connection