pub trait Formatter: 'static + Send {
    fn format_transport_error(
        &self,
        context: &Context<'_>,
        error: Error
    ) -> ConnectionClose<'_>;
fn format_application_error(
        &self,
        context: &Context<'_>,
        error: Error
    ) -> ConnectionClose<'_>;
fn format_early_transport_error(
        &self,
        context: &Context<'_>,
        error: Error
    ) -> ConnectionClose<'_>;
fn format_early_application_error(
        &self,
        context: &Context<'_>,
        error: Error
    ) -> ConnectionClose<'_>; }
Expand description

Provides a hook for applications to rewrite CONNECTION_CLOSE frames

Implementations should take care to not leak potentially sensitive information to peers. This includes removing reason fields and making error codes more general.

Required methods

Formats a transport error for use in 1-RTT (application data) packets

Formats an application error for use in 1-RTT (application data) packets

Formats a transport error for use in early (initial, handshake) packets

Formats an application error for use in early (initial, handshake) packets

Implementors