Skip to navigation

Enum Resource Limit Event Kind

View as Markdown

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.

#[repr(i32)]pub enum ResourceLimitEventKind {
Unspecified = 0,
Throttled = 1,
High = 2,
Maximum = 3,
OutOfMemory = 4,
Terminated = 5,
}

Canonical resource limit event kind values from the shared runtime types.

Variants

Unspecified = 0

Unspecified = 0

No value supplied; invalid where an explicit value is required.

Throttled = 1

Throttled = 1

CPU execution was throttled.

High = 2

High = 2

A high threshold was crossed.

Maximum = 3

Maximum = 3

A configured maximum was reached.

OutOfMemory = 4

OutOfMemory = 4

An out-of-memory condition occurred.

Terminated = 5

Terminated = 5

A process was terminated by the resource boundary.

Implementations

impl ResourceLimitEventKind

impl ResourceLimitEventKind

is_valid

pub fn is_valid(value: i32) -> bool

Returns true if value is a variant of ResourceLimitEventKind.

from_i32

pub fn from_i32(value: i32) -> Option<ResourceLimitEventKind>

Converts an i32 to a ResourceLimitEventKind, or None if value is not a valid variant.

impl ResourceLimitEventKind

impl ResourceLimitEventKind

as_str_name

pub fn as_str_name(&self) -> &'static str

String value of the enum field names used in the ProtoBuf definition.

The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.

from_str_name

pub fn from_str_name(value: &str) -> Option<Self>

Creates an enum from field names used in the ProtoBuf definition.

Trait Implementations

impl Clone for ResourceLimitEventKind

impl Clone for ResourceLimitEventKind

clone

fn clone(&self) -> ResourceLimitEventKind

clone_from

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

impl Debug for ResourceLimitEventKind

impl Debug for ResourceLimitEventKind

fmt

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

impl Default for ResourceLimitEventKind

impl Default for ResourceLimitEventKind

default

fn default() -> ResourceLimitEventKind

impl From<ResourceLimitEventKind> for i32

impl From<ResourceLimitEventKind> for i32

from

fn from(value: ResourceLimitEventKind) -> i32

impl Hash for ResourceLimitEventKind

impl Hash for ResourceLimitEventKind

hash

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

hash_slice

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

impl Ord for ResourceLimitEventKind

impl Ord for ResourceLimitEventKind

cmp

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

impl PartialEq for ResourceLimitEventKind

eq

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

ne

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

impl PartialOrd for ResourceLimitEventKind

impl PartialOrd for ResourceLimitEventKind

partial_cmp

fn partial_cmp(&self, other: &ResourceLimitEventKind) -> 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 TryFrom<i32> for ResourceLimitEventKind

impl TryFrom<i32> for ResourceLimitEventKind

Error

type Error = UnknownEnumValue

try_from

fn try_from(value: i32) -> Result<ResourceLimitEventKind, UnknownEnumValue>

impl Copy for ResourceLimitEventKind

impl Copy for ResourceLimitEventKind

impl Eq for ResourceLimitEventKind

impl Eq for ResourceLimitEventKind

impl StructuralPartialEq for ResourceLimitEventKind

impl StructuralPartialEq for ResourceLimitEventKind