Trait s2n_quic_transport::connection::close::Formatter
source · [−]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
fn format_transport_error(
&self,
context: &Context<'_>,
error: Error
) -> ConnectionClose<'_>
fn format_transport_error(
&self,
context: &Context<'_>,
error: Error
) -> ConnectionClose<'_>
Formats a transport error for use in 1-RTT (application data) packets
fn format_application_error(
&self,
context: &Context<'_>,
error: Error
) -> ConnectionClose<'_>
fn format_application_error(
&self,
context: &Context<'_>,
error: Error
) -> ConnectionClose<'_>
Formats an application error for use in 1-RTT (application data) packets
fn format_early_transport_error(
&self,
context: &Context<'_>,
error: Error
) -> ConnectionClose<'_>
fn format_early_transport_error(
&self,
context: &Context<'_>,
error: Error
) -> ConnectionClose<'_>
Formats a transport error for use in early (initial, handshake) packets
fn format_early_application_error(
&self,
context: &Context<'_>,
error: Error
) -> ConnectionClose<'_>
fn format_early_application_error(
&self,
context: &Context<'_>,
error: Error
) -> ConnectionClose<'_>
Formats an application error for use in early (initial, handshake) packets