Skip to main content

NodeConfigExt

Trait NodeConfigExt 

Source
pub trait NodeConfigExt {
    // Required methods
    fn new(platform_type: String) -> Self;
    fn with_operator(
        platform_type: String,
        operator_binding: HumanMachinePair,
    ) -> Self;
    fn add_capability(&mut self, capability: Capability);
    fn has_capability_type(&self, capability_type: CapabilityType) -> bool;
    fn get_capabilities_by_type(
        &self,
        capability_type: CapabilityType,
    ) -> Vec<&Capability>;
    fn has_operator(&self) -> bool;
    fn is_human_operated(&self) -> bool;
    fn get_primary_operator(&self) -> Option<&Operator>;
    fn get_operator_binding(&self) -> Option<&HumanMachinePair>;
    fn set_operator_binding(&mut self, binding: Option<HumanMachinePair>);
    fn is_autonomous(&self) -> bool;
}

Required Methods§

Source

fn new(platform_type: String) -> Self

Create a new node configuration (autonomous, no operator)

Source

fn with_operator( platform_type: String, operator_binding: HumanMachinePair, ) -> Self

Create a new platform with operator binding

Source

fn add_capability(&mut self, capability: Capability)

Add a capability (G-Set operation - monotonic add only)

Source

fn has_capability_type(&self, capability_type: CapabilityType) -> bool

Check if platform has a specific capability type

Source

fn get_capabilities_by_type( &self, capability_type: CapabilityType, ) -> Vec<&Capability>

Get all capabilities of a specific type

Source

fn has_operator(&self) -> bool

Check if platform has an operator binding

Source

fn is_human_operated(&self) -> bool

Check if platform is human-operated (has at least one operator)

Source

fn get_primary_operator(&self) -> Option<&Operator>

Get the primary operator (highest-ranking) if any

Source

fn get_operator_binding(&self) -> Option<&HumanMachinePair>

Get the operator binding

Source

fn set_operator_binding(&mut self, binding: Option<HumanMachinePair>)

Set or update the operator binding

Source

fn is_autonomous(&self) -> bool

Check if platform is autonomous (no operators)

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§