Skip to navigation

Generated from cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -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 LlmOptimizationKind(/* private fields */);

Open, forward-compatible optimization classification.

This is intentionally a string-backed newtype rather than a closed enum: third-party optimization kinds must deserialize and round-trip losslessly before Relay knows about them. Standard constants and constructors provide enum-like ergonomics without making new producers wait for a core release.

Implementations

impl LlmOptimizationKind

impl LlmOptimizationKind

Referenced types: LlmOptimizationKind

INPUT_COMPRESSION

pub const INPUT_COMPRESSION: &'static str = "input_compression"

Referenced types: str

A request transformation that reduces input tokens.

MODEL_ROUTING

pub const MODEL_ROUTING: &'static str = "model_routing"

Referenced types: str

A routing decision that changes the model serving a request.

new

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

Referenced types: Into, String, LlmOptimizationKind

Preserve an arbitrary producer-defined kind on the wire.

as_str

pub fn as_str(&self) -> &str

Referenced types: str

Return the exact wire value.

input_compression

pub fn input_compression() -> LlmOptimizationKind

Referenced types: LlmOptimizationKind

Construct the standard input-compression kind.

model_routing

pub fn model_routing() -> LlmOptimizationKind

Referenced types: LlmOptimizationKind

Construct the standard model-routing kind.

Trait Implementations

impl Clone for LlmOptimizationKind

impl Clone for LlmOptimizationKind

Referenced types: Clone, LlmOptimizationKind

clone

fn clone(&self) -> LlmOptimizationKind

Referenced types: clone, LlmOptimizationKind

clone_from

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

Referenced types: clone_from

impl Debug for LlmOptimizationKind

impl Debug for LlmOptimizationKind

Referenced types: Debug, LlmOptimizationKind

fmt

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

Referenced types: fmt, Formatter, Result, (), Error

impl<'de> Deserialize<'de> for LlmOptimizationKind

impl<'de> Deserialize<'de> for LlmOptimizationKind

Referenced types: Deserialize, LlmOptimizationKind

deserialize

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

Referenced types: deserialize, Result, LlmOptimizationKind, Deserializer, Error

impl From<&str> for LlmOptimizationKind

impl From<&str> for LlmOptimizationKind

Referenced types: From, str, LlmOptimizationKind

from

fn from(value: &str) -> LlmOptimizationKind

Referenced types: from, str, LlmOptimizationKind

impl From<String> for LlmOptimizationKind

impl From<String> for LlmOptimizationKind

Referenced types: From, String, LlmOptimizationKind

from

fn from(value: String) -> LlmOptimizationKind

Referenced types: from, String, LlmOptimizationKind

impl Hash for LlmOptimizationKind

impl Hash for LlmOptimizationKind

Referenced types: Hash, LlmOptimizationKind

hash

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

Referenced types: hash, &mut __H, Hasher

hash_slice

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

Referenced types: hash_slice, &mut H, Hasher, Sized

impl Ord for LlmOptimizationKind

impl Ord for LlmOptimizationKind

Referenced types: Ord, LlmOptimizationKind

cmp

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

Referenced types: cmp, LlmOptimizationKind, Ordering

max

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

Referenced types: max, Sized

min

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

Referenced types: min, Sized

clamp

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

Referenced types: clamp, Sized

impl PartialEq for LlmOptimizationKind

impl PartialEq for LlmOptimizationKind

Referenced types: PartialEq, LlmOptimizationKind

eq

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

Referenced types: eq, LlmOptimizationKind, bool

ne

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

Referenced types: ne, &Rhs, bool

impl PartialOrd for LlmOptimizationKind

impl PartialOrd for LlmOptimizationKind

Referenced types: PartialOrd, LlmOptimizationKind

partial_cmp

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

Referenced types: partial_cmp, LlmOptimizationKind, Option, Ordering

lt

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

Referenced types: lt, &Rhs, bool

le

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

Referenced types: le, &Rhs, bool

gt

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

Referenced types: gt, &Rhs, bool

ge

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

Referenced types: ge, &Rhs, bool

impl Serialize for LlmOptimizationKind

impl Serialize for LlmOptimizationKind

Referenced types: Serialize, LlmOptimizationKind

serialize

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

Referenced types: serialize, Result, Serializer, Ok, Error

impl Eq for LlmOptimizationKind

impl Eq for LlmOptimizationKind

Referenced types: Eq, LlmOptimizationKind

impl StructuralPartialEq for LlmOptimizationKind

impl StructuralPartialEq for LlmOptimizationKind

Referenced types: StructuralPartialEq, LlmOptimizationKind