Skip to navigation

Struct Diagnostic Http Error

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

pub struct DiagnosticHttpError {
    pub error: DiagnosticHttpErrorDetails,
}

Error envelope returned by diagnostic HTTP routes.

Fields

error: DiagnosticHttpErrorDetails

Safe machine-readable error details.

Implementations

impl DiagnosticHttpError

impl DiagnosticHttpError

new

pub fn new(reason: DiagnosticHttpReason) -> Self

Construct a canonical error body, including schema negotiation metadata.

from_response

pub fn from_response(status: u16, body: &[u8]) -> Option<Self>

Decode a bounded known error whose reason agrees with the HTTP status. Unknown reasons, malformed bodies, and status mismatches require a consumer fallback. Unknown fields are accepted for additive protocol evolution. The envelope and details must be objects, and the reason must be a string.

Trait Implementations

impl Clone for DiagnosticHttpError

impl Clone for DiagnosticHttpError

clone

fn clone(&self) -> DiagnosticHttpError

clone_from

fn clone_from(&mut self, source: &Self)

impl Debug for DiagnosticHttpError

impl Debug for DiagnosticHttpError

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<'de> Deserialize<'de> for DiagnosticHttpError

impl<'de> Deserialize<'de> for DiagnosticHttpError

deserialize

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,

impl PartialEq for DiagnosticHttpError

impl PartialEq for DiagnosticHttpError

eq

fn eq(&self, other: &DiagnosticHttpError) -> bool

ne

fn ne(&self, other: &Rhs) -> bool

impl Serialize for DiagnosticHttpError

impl Serialize for DiagnosticHttpError

serialize

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
    __S: Serializer,

impl Eq for DiagnosticHttpError

impl Eq for DiagnosticHttpError

impl StructuralPartialEq for DiagnosticHttpError

impl StructuralPartialEq for DiagnosticHttpError