pub struct MetadataRecorder<const MAX_NODES: usize = DEFAULT_MAX_METADATA_NODES, const MAX_ENTITIES: usize = DEFAULT_MAX_METADATA_ENTITIES, const MAX_CALLBACKS: usize = DEFAULT_MAX_METADATA_CALLBACKS> { /* private fields */ }Expand description
In-memory metadata sink used by host discovery. It never opens transport.
Implementations§
Source§impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> MetadataRecorder<MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>
impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> MetadataRecorder<MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>
Sourcepub fn nodes(&self) -> &[NodeMetadata]
pub fn nodes(&self) -> &[NodeMetadata]
Recorded nodes in declaration order.
Sourcepub fn entities(&self) -> &[EntityMetadata]
pub fn entities(&self) -> &[EntityMetadata]
Recorded entities in declaration order.
Sourcepub fn callback_effects(&self) -> &[CallbackEffectMetadata]
pub fn callback_effects(&self) -> &[CallbackEffectMetadata]
Recorded optional callback effects in declaration order.
Sourcepub fn to_source_metadata_json(
&self,
export: &SourceMetadataExport<'_>,
) -> Result<StdString, Error>
pub fn to_source_metadata_json( &self, export: &SourceMetadataExport<'_>, ) -> Result<StdString, Error>
Emit schema-version-1 source metadata JSON without opening transport.
Sourcepub fn write_source_metadata_json(
&self,
export: &SourceMetadataExport<'_>,
out: &mut impl Write,
) -> Result
pub fn write_source_metadata_json( &self, export: &SourceMetadataExport<'_>, out: &mut impl Write, ) -> Result
Write schema-version-1 source metadata JSON without opening transport.
Trait Implementations§
Source§impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> Debug for MetadataRecorder<MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>
impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> Debug for MetadataRecorder<MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>
Source§impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> Default for MetadataRecorder<MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>
impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> Default for MetadataRecorder<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>
impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> NodeRuntime for MetadataRecorder<MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>
Source§fn create_node(
&mut self,
id: NodeId<'_>,
options: NodeOptions<'_>,
) -> NodeResult<()>
fn create_node( &mut self, id: NodeId<'_>, options: NodeOptions<'_>, ) -> NodeResult<()>
Declare a component node.
Source§fn create_entity(&mut self, metadata: EntityMetadata) -> NodeResult<()>
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<()>
fn record_callback_effect( &mut self, callback_id: CallbackId<'_>, kind: CallbackEffectKind, entity_id: EntityId<'_>, ) -> NodeResult<()>
Add optional callback effect metadata.
Auto Trait Implementations§
impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> Freeze for MetadataRecorder<MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>
impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> RefUnwindSafe for MetadataRecorder<MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>
impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> Send for MetadataRecorder<MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>
impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> Sync for MetadataRecorder<MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>
impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> Unpin for MetadataRecorder<MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>
impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> UnsafeUnpin for MetadataRecorder<MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>
impl<const MAX_NODES: usize, const MAX_ENTITIES: usize, const MAX_CALLBACKS: usize> UnwindSafe for MetadataRecorder<MAX_NODES, MAX_ENTITIES, MAX_CALLBACKS>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more