pub struct NodeDefinition {
pub node_type: String,
pub label: String,
pub icon: String,
pub header_color: String,
pub category: String,
pub fields: Vec<FieldDef>,
pub inputs: Vec<Port>,
pub outputs: Vec<Port>,
}Expand description
Declarative definition of a node type.
Registered via WorkflowGraph.registerNodeType(). The renderer uses this
to draw colored headers, inline fields, and type-specific visuals.
Consumers can define any number of custom node types.
Fields§
§node_type: StringUnique type key (e.g., “agent”, “tool”, “my-custom-node”).
Matched against Job.metadata["node_type"].
label: StringDisplay label shown in the header bar.
icon: StringIcon character (emoji or Unicode) rendered in the header.
header_color: StringHex color for the header bar (e.g., “#3b82f6”).
category: StringCategory for grouping in palettes (consumer-defined, no constraints).
fields: Vec<FieldDef>Inline fields rendered in the node body.
inputs: Vec<Port>Default input ports for this node type.
outputs: Vec<Port>Default output ports for this node type.
Trait Implementations§
Source§impl Clone for NodeDefinition
impl Clone for NodeDefinition
Source§fn clone(&self) -> NodeDefinition
fn clone(&self) -> NodeDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NodeDefinition
impl Debug for NodeDefinition
Source§impl<'de> Deserialize<'de> for NodeDefinition
impl<'de> Deserialize<'de> for NodeDefinition
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
Auto Trait Implementations§
impl Freeze for NodeDefinition
impl RefUnwindSafe for NodeDefinition
impl Send for NodeDefinition
impl Sync for NodeDefinition
impl Unpin for NodeDefinition
impl UnsafeUnpin for NodeDefinition
impl UnwindSafe for NodeDefinition
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