Struct Component Spec

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.

pub struct ComponentSpec {
    pub enabled: bool,
    pub config: ObservabilityConfig,
}

Top-level observability component wrapper.

Use this wrapper when constructing a PluginComponentSpec from Rust instead of hand-writing the generic plugin component shape. The component kind is always OBSERVABILITY_PLUGIN_KIND.

Fields

enabled: bool

Whether the observability component should be activated.

config: ObservabilityConfig

Observability config for this top-level component.

Implementations

impl ComponentSpec

impl ComponentSpec

new

pub fn new(config: ObservabilityConfig) -> Self

Creates an enabled observability component spec.

The returned component can be converted into the generic plugin config entry with PluginComponentSpec::from(...).

Trait Implementations

impl Clone for ComponentSpec

impl Clone for ComponentSpec

clone

fn clone(&self) -> ComponentSpec

clone_from

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

impl Debug for ComponentSpec

impl Debug for ComponentSpec

fmt

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

impl From<ComponentSpec> for PluginComponentSpec

impl From<ComponentSpec> for PluginComponentSpec

from

fn from(value: ComponentSpec) -> Self