Struct Translation Report

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.

pub struct TranslationReport {
    pub request_id: Uuid,
    pub plugin_id: String,
    pub outcomes: Vec<IntentOutcome>,
    pub created_at: DateTime<Utc>,
}

A plugin’s complete report on how it handled an intent bundle.

Every intent in the input bundle MUST have a corresponding outcome in the report. This is the critical observability contract per the design doc.

Fields

request_id: Uuid

ID of the request this report pertains to.

plugin_id: String

Identity of the plugin that produced this report.

outcomes: Vec<IntentOutcome>

Per-intent outcomes.

created_at: DateTime<Utc>

When this report was generated.

Implementations

impl TranslationReport

impl TranslationReport

all_applied

pub fn all_applied(&self) -> bool

Returns true if every intent was fully applied.

outcomes_by_status

pub fn outcomes_by_status(
    &self,
    status: TranslationStatus,
) -> Vec<&IntentOutcome>

Filter outcomes by status.

count_by_status

pub fn count_by_status(&self, status: TranslationStatus) -> usize

Count of outcomes with the given status.

all_ignored

pub fn all_ignored(
    bundle: &OptimizationIntentBundle,
    plugin_id: &str,
    reason: ReasonCode,
    detail: Option<String>,
) -> Self

Create a report where all intents are ignored (passthrough behavior).

Generates one IntentOutcome per intent in the bundle, each with TranslationStatus::Ignored and the given reason code. This is the standard helper for passthrough and default plugin implementations.

Trait Implementations

impl Clone for TranslationReport

impl Clone for TranslationReport

clone

fn clone(&self) -> TranslationReport

clone_from

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

impl Debug for TranslationReport

impl Debug for TranslationReport

fmt

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

impl<'de> Deserialize<'de> for TranslationReport

impl<'de> Deserialize<'de> for TranslationReport

deserialize

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

impl PartialEq for TranslationReport

impl PartialEq for TranslationReport

eq

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

ne

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

impl Serialize for TranslationReport

impl Serialize for TranslationReport

serialize

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

impl StructuralPartialEq for TranslationReport

impl StructuralPartialEq for TranslationReport