Struct Event Category

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.

1pub struct EventCategory(/* private fields */);

Semantic category carried by ATOF category.

This is intentionally string-backed so consumers can preserve category values from newer producers without failing deserialization.

Implementations

impl EventCategory

impl EventCategory

agent

pub fn agent() -> EventCategory

Top-level agent or workflow scope.

Returns

An EventCategory with the wire value agent.

function

pub fn function() -> EventCategory

Generic function or application step.

Returns

An EventCategory with the wire value function.

llm

pub fn llm() -> EventCategory

LLM call.

Returns

An EventCategory with the wire value llm.

tool

pub fn tool() -> EventCategory

Tool invocation.

Returns

An EventCategory with the wire value tool.

retriever

pub fn retriever() -> EventCategory

Retrieval step.

Returns

An EventCategory with the wire value retriever.

embedder

pub fn embedder() -> EventCategory

Embedding-generation step.

Returns

An EventCategory with the wire value embedder.

reranker

pub fn reranker() -> EventCategory

Result reranking step.

Returns

An EventCategory with the wire value reranker.

guardrail

pub fn guardrail() -> EventCategory

Guardrail or validation step.

Returns

An EventCategory with the wire value guardrail.

evaluator

pub fn evaluator() -> EventCategory

Evaluation or scoring step.

Returns

An EventCategory with the wire value evaluator.

custom

pub fn custom() -> EventCategory

Vendor-defined custom category.

Returns

An EventCategory with the wire value custom.

unknown

pub fn unknown() -> EventCategory

Unknown or unclassified work.

Returns

An EventCategory with the wire value unknown.

new

pub fn new(value: impl Into<String>) -> EventCategory

Create a category from an arbitrary producer-provided string.

Parameters
  • value: Wire category value to preserve.
Returns

An EventCategory containing value.

as_str

pub fn as_str(&self) -> &str

Return the string form serialized on the wire.

Returns

The category value as a string slice.

to_scope_type

pub fn to_scope_type(&self) -> ScopeType

Convert this category to the closest legacy scope type for internal adapters that still need span-kind classification.

Returns

The closest matching ScopeType, or ScopeType::Unknown when the category has no legacy equivalent.

Trait Implementations

impl Clone for EventCategory

impl Clone for EventCategory

clone

fn clone(&self) -> EventCategory

clone_from

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

impl Debug for EventCategory

impl Debug for EventCategory

fmt

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

impl<'de> Deserialize<'de> for EventCategory

impl<'de> Deserialize<'de> for EventCategory

deserialize

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

impl From<&EventCategory> for ScopeType

impl From<&EventCategory> for ScopeType

from

fn from(value: &EventCategory) -> ScopeType

impl From<ScopeType> for EventCategory

impl From<ScopeType> for EventCategory

from

fn from(value: ScopeType) -> EventCategory

impl Hash for EventCategory

impl Hash for EventCategory

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 EventCategory

impl Ord for EventCategory

cmp

fn cmp(&self, other: &EventCategory) -> 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 EventCategory

impl PartialEq for EventCategory

eq

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

ne

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

impl PartialOrd for EventCategory

impl PartialOrd for EventCategory

partial_cmp

fn partial_cmp(&self, other: &EventCategory) -> 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 EventCategory

impl Serialize for EventCategory

serialize

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

impl Eq for EventCategory

impl Eq for EventCategory

impl StructuralPartialEq for EventCategory

impl StructuralPartialEq for EventCategory