Skip to main content

Node

Trait Node 

Source
pub trait Node {
    const NAME: &'static str;
    const DISPATCH: DispatchStrategy = crate::DispatchStrategy::Inline;

    // Required method
    fn register(context: &mut NodeContext<'_>) -> NodeResult<()>;
}
Expand description

Rust component entry point.

Required Associated Constants§

Source

const NAME: &'static str

Source component name used in metadata and diagnostics.

Provided Associated Constants§

Source

const DISPATCH: DispatchStrategy = crate::DispatchStrategy::Inline

Phase 216.A.3 — declares which dispatch strategy this Node requires from the runtime. Defaults to crate::DispatchStrategy::Inline so every existing component keeps compiling without source change; the substrate (Phase 216.A.2) and nros check (Phase 216.D.1) consume it to pick / validate the board-side dispatch path.

Required Methods§

Source

fn register(context: &mut NodeContext<'_>) -> NodeResult<()>

Declare nodes, entities, callbacks, params, and optional effects.

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§