Skip to main content

Reason

Type Alias Reason 

pub type Reason = ReasonView<'static>;
Available on crate features quic and std only.
Expand description

Diagnostic reason with owned or static backing storage.

Aliased Type§

pub enum Reason {
    Static(&'static str),
    Text(&'static str),
    Owned(Box<str>),
    Bytes(Cow<'static, [u8]>),
}

Variants§

§

Static(&'static str)

Static text retained without allocation.

§

Text(&'static str)

UTF-8 text borrowed from the observation source.

§

Owned(Box<str>)

Independently owned UTF-8 text.

§

Bytes(Cow<'static, [u8]>)

Original wire bytes; invalid UTF-8 becomes replacement characters during serialization.