pub struct NodeDescriptor {
pub node_type: &'static str,
pub crate_name: &'static str,
pub description: &'static str,
pub default_run_target: &'static str,
pub catalog_tags: &'static [&'static str],
pub schema: fn() -> Value,
}Expand description
Everything a later consumer (schema registry, CLI catalog) needs to know about a registered
node, resolved from a [NodeDescriptorThunk] that evaluated to Some. See the module docs
for the overall design and why this is reached via registered_nodes rather than an
inventory::iter of this type directly.
Fields§
§node_type: &'static strThe node’s wire type identifier, e.g. "camera".
crate_name: &'static strCrate name as it appears in Cargo.toml, e.g. "mecha10-nodes-camera".
description: &'static strHuman-readable description of what the node does.
default_run_target: &'static strDefault mecha10 add/run target for this node.
Free-form catalog search tags, e.g. &["camera", "video", "streaming"].
schema: fn() -> ValueComputes this node’s config JSON Schema. A plain fn rather than an eagerly-computed
Value so schema generation only runs for descriptors a caller actually reads.
Auto Trait Implementations§
impl Freeze for NodeDescriptor
impl RefUnwindSafe for NodeDescriptor
impl Send for NodeDescriptor
impl Sync for NodeDescriptor
impl Unpin for NodeDescriptor
impl UnsafeUnpin for NodeDescriptor
impl UnwindSafe for NodeDescriptor
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more