pub struct QuicPinger {
pub endpoint: String,
pub timeout: Duration,
pub alpn: Vec<Vec<u8>>,
/* private fields */
}Expand description
QUIC pinger. Reports the time taken to complete the QUIC handshake (UDP + Initial / Handshake / 1-RTT keys ready). Doesn’t open streams or speak HTTP/3 frames — handshake completion IS the success signal.
Fields§
§endpoint: String§timeout: Duration§alpn: Vec<Vec<u8>>Implementations§
Source§impl QuicPinger
impl QuicPinger
pub fn new(endpoint: impl Into<String>) -> Self
pub fn with_timeout(self, t: Duration) -> Self
Sourcepub fn with_alpn(self, alpn: Vec<Vec<u8>>) -> Self
pub fn with_alpn(self, alpn: Vec<Vec<u8>>) -> Self
Replace the ALPN list. Default is [b"h3".to_vec()]. Pass an
empty vec to send a TLS ClientHello with no ALPN extension at
all — most servers will refuse, but a few legacy QUIC stacks
expect that.
Sourcepub fn with_tls_config(self, config: Arc<ClientConfig>) -> Self
pub fn with_tls_config(self, config: Arc<ClientConfig>) -> Self
Inject a custom rustls ClientConfig. The pinger will set the
ALPN list on a clone before handing it to quinn, so caller-
provided ALPN is overwritten by self.alpn. Use this for
self-signed test endpoints (set the trust anchor here).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for QuicPinger
impl !UnwindSafe for QuicPinger
impl Freeze for QuicPinger
impl Send for QuicPinger
impl Sync for QuicPinger
impl Unpin for QuicPinger
impl UnsafeUnpin for QuicPinger
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request