Skip to main content

OperatorExt

Trait OperatorExt 

Source
pub trait OperatorExt {
    // Required methods
    fn new(
        id: String,
        name: String,
        rank: OperatorRank,
        authority: AuthorityLevel,
        mos: String,
    ) -> Self;
    fn update_cognitive_load(&mut self, load: f32);
    fn update_fatigue(&mut self, fatigue: f32);
    fn cognitive_load(&self) -> f32;
    fn fatigue(&self) -> f32;
    fn is_overloaded(&self, threshold: f32) -> bool;
    fn is_fatigued(&self, threshold: f32) -> bool;
    fn effectiveness(&self) -> f32;
}

Required Methods§

Source

fn new( id: String, name: String, rank: OperatorRank, authority: AuthorityLevel, mos: String, ) -> Self

Create a new operator with default cognitive state

Source

fn update_cognitive_load(&mut self, load: f32)

Update cognitive load from metadata (clamped to 0.0-1.0)

Source

fn update_fatigue(&mut self, fatigue: f32)

Update fatigue from metadata (clamped to 0.0-1.0)

Source

fn cognitive_load(&self) -> f32

Get cognitive load from metadata

Source

fn fatigue(&self) -> f32

Get fatigue from metadata

Source

fn is_overloaded(&self, threshold: f32) -> bool

Check if operator is overloaded (cognitive load > threshold)

Source

fn is_fatigued(&self, threshold: f32) -> bool

Check if operator is fatigued (fatigue > threshold)

Source

fn effectiveness(&self) -> f32

Get operator effectiveness score (0.0-1.0) Considers cognitive load and fatigue

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§