Skip to navigation

Enum Builtin Diagnostic Code

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.

#[non_exhaustive]pub enum BuiltinDiagnosticCode {
    Failure(FailureCode),
    Success(SuccessCode),
    Notice(NoticeCode),
}

Fixed-size canonical authoring value with one authoritative hierarchy.

Variants (Non-exhaustive)

Failure(FailureCode)

Failure(FailureCode)

Failure observation.

Success(SuccessCode)

Success(SuccessCode)

Success observation.

Notice(NoticeCode)

Notice(NoticeCode)

Notice observation.

Implementations

impl BuiltinDiagnosticCode

impl BuiltinDiagnosticCode

canonical_name

pub const fn canonical_name(self) -> &'static str

Stable name used on the wire and in operational projections.

domain

pub const fn domain(self) -> DiagnosticDomain

Parent domain derived from the individual catalogue entry.

Outcome does not determine ownership. Match each success/notice explicitly so adding another entry requires choosing its owning domain.

plugin_family

pub const fn plugin_family(self) -> Option<PluginDiagnosticFamily>

Plugin catalogue family, independent of the execution mechanism.

Each success/notice explicitly selects a family or None; future plugin successes must choose their family when their producer is integrated.

allowed_classes

pub const fn allowed_classes(self) -> &'static [FailureClass]

Permitted causes; success and notice codes accept no failure class.

allows_class

pub fn allows_class(self, class: Option<FailureClass>) -> bool

Check a class against the entry-specific catalogue contract.

all

pub fn all() -> &'static [BuiltinDiagnosticCode]

All implemented catalogue entries.

from_canonical_name

pub fn from_canonical_name(name: &str) -> Option<BuiltinDiagnosticCode>

Look up a built-in code without accepting prefixes or inspecting messages.

Trait Implementations

impl Clone for BuiltinDiagnosticCode

impl Clone for BuiltinDiagnosticCode

clone

fn clone(&self) -> BuiltinDiagnosticCode

clone_from

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

impl Debug for BuiltinDiagnosticCode

impl Debug for BuiltinDiagnosticCode

fmt

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

impl<'de> Deserialize<'de> for BuiltinDiagnosticCode

impl<'de> Deserialize<'de> for BuiltinDiagnosticCode

deserialize

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

impl Hash for BuiltinDiagnosticCode

impl Hash for BuiltinDiagnosticCode

hash

fn hash<__H>(&self, state: &mut __H)where
    __H: Hasher,

hash_slice

fn hash_slice<H>(data: &[Self], state: &mut H)where
    H: Hasher,
    Self: Sized,

impl Ord for BuiltinDiagnosticCode

impl Ord for BuiltinDiagnosticCode

cmp

fn cmp(&self, other: &BuiltinDiagnosticCode) -> Ordering

max

fn max(self, other: Self) -> Selfwhere
    Self: Sized,

min

fn min(self, other: Self) -> Selfwhere
    Self: Sized,

clamp

fn clamp(self, min: Self, max: Self) -> Selfwhere
    Self: Sized,

impl PartialEq for BuiltinDiagnosticCode

impl PartialEq for BuiltinDiagnosticCode

eq

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

ne

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

impl PartialOrd for BuiltinDiagnosticCode

impl PartialOrd for BuiltinDiagnosticCode

partial_cmp

fn partial_cmp(&self, other: &BuiltinDiagnosticCode) -> Option<Ordering>

lt

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

le

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

gt

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

ge

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

impl Serialize for BuiltinDiagnosticCode

impl Serialize for BuiltinDiagnosticCode

serialize

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

impl Copy for BuiltinDiagnosticCode

impl Copy for BuiltinDiagnosticCode

impl Eq for BuiltinDiagnosticCode

impl Eq for BuiltinDiagnosticCode

impl StructuralPartialEq for BuiltinDiagnosticCode

impl StructuralPartialEq for BuiltinDiagnosticCode