Skip to main content

AltSvcObserver

Trait AltSvcObserver 

pub trait AltSvcObserver:
    Send
    + Sync
    + 'static {
    // Required method
    fn observe(&self, event: AltSvcEvent, connection: &Extensions);
}
Available on crate features http and std only.
Expand description

Receive connection-local alternative-service observations directly.

The HTTP/2 driver calls this synchronously. Implementations must return promptly, bound retained state, and authorize the advertised origin against the established connection metadata before using an advertisement. No observer is installed by default, and observations are never relayed.

Required Methods§

fn observe(&self, event: AltSvcEvent, connection: &Extensions)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§