pub struct NodeDescriptor {
pub kind: String,
pub title: String,
pub description: String,
pub category: NodeCategory,
pub config_schema: Value,
pub outputs: Vec<OutputDescriptor>,
pub dynamic_outputs: bool,
pub handles: Handles,
pub container: bool,
pub icon: Option<String>,
pub source: String,
}Expand description
Description of a node kind.
Unknown keys are rejected: a misspelled config_schema or handles in a
plugin manifest would otherwise silently change how the node behaves.
Fields§
§kind: StringNode type used in workflow documents.
title: String§description: String§category: NodeCategory§config_schema: ValueJSON Schema of the node’s config object (the node fields other than
id/type/title/parent/policy). {} when unspecified.
outputs: Vec<OutputDescriptor>Static outputs. Nodes whose outputs depend on config (start, end, code…)
list none and set dynamic_outputs.
dynamic_outputs: bool§handles: Handles§container: boolWhether the node owns a child scope (iteration, loop).
icon: Option<String>Short icon hint (e.g. brain, globe, code), purely cosmetic.
source: StringOrigin: builtin, the crate name, or plugin:<name>.
Implementations§
Source§impl NodeDescriptor
impl NodeDescriptor
pub fn new( kind: impl Into<String>, title: impl Into<String>, category: NodeCategory, ) -> Self
pub fn describe(self, description: impl Into<String>) -> Self
pub fn schema(self, schema: Value) -> Self
pub fn output(self, output: OutputDescriptor) -> Self
pub fn dynamic_outputs(self) -> Self
pub fn handles(self, handles: Handles) -> Self
pub fn container(self) -> Self
pub fn icon(self, icon: impl Into<String>) -> Self
pub fn source(self, source: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for NodeDescriptor
impl Clone for NodeDescriptor
Source§impl Debug for NodeDescriptor
impl Debug for NodeDescriptor
Source§impl<'de> Deserialize<'de> for NodeDescriptor
impl<'de> Deserialize<'de> for NodeDescriptor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for NodeDescriptor
impl PartialEq for NodeDescriptor
Source§impl Serialize for NodeDescriptor
impl Serialize for NodeDescriptor
impl StructuralPartialEq for NodeDescriptor
Auto Trait Implementations§
impl Forget for NodeDescriptor
impl Freeze for NodeDescriptor
impl Move 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