Skip to main content

NodeRuntime

Trait NodeRuntime 

Source
pub trait NodeRuntime {
    // Required methods
    fn create_node(
        &mut self,
        id: NodeId<'_>,
        options: NodeOptions<'_>,
    ) -> NodeResult<()>;
    fn create_entity(&mut self, metadata: EntityMetadata) -> NodeResult<()>;
    fn record_callback_effect(
        &mut self,
        callback_id: CallbackId<'_>,
        kind: CallbackEffectKind,
        entity_id: EntityId<'_>,
    ) -> NodeResult<()>;
}
Expand description

Declaration sink implemented by metadata recorders and generated runtimes.

Required Methods§

Source

fn create_node( &mut self, id: NodeId<'_>, options: NodeOptions<'_>, ) -> NodeResult<()>

Declare a component node.

Source

fn create_entity(&mut self, metadata: EntityMetadata) -> NodeResult<()>

Declare a publisher, subscription, timer, service, action, or parameter.

Source

fn record_callback_effect( &mut self, callback_id: CallbackId<'_>, kind: CallbackEffectKind, entity_id: EntityId<'_>, ) -> NodeResult<()>

Add optional callback effect metadata.

Implementors§

Source§

impl<R: DeclaredNodeRuntime + ?Sized, const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> NodeRuntime for NodeRuntimeAdapter<'_, R, MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>

Source§

impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> NodeRuntime for MetadataRecorder<MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>