Expand description
Core types for the Weavegraph workflow framework.
This module defines the fundamental types used throughout the Weavegraph system for identifying nodes and channels in workflow graphs. These are the core domain concepts that define what a workflow is.
For runtime execution types (session IDs, step numbers), see crate::runtimes::types.
§Key Types
NodeKind: Identifies different types of nodes in a workflow graphChannelType: Identifies different types of data channels for state management
§Type Organization
Weavegraph organizes types by conceptual domain:
- Core types (this module): Fundamental workflow concepts (
NodeKind,ChannelType) - Runtime types (
crate::runtimes::types): Execution infrastructure (SessionId,StepNumber) - Utility types: Domain-specific helpers in their respective modules
§Examples
use weavegraph::types::{NodeKind, ChannelType};
// Create different types of nodes
let start = NodeKind::Start;
let custom = NodeKind::Custom("ProcessData".to_string());
let end = NodeKind::End;
// Encode for persistence
let encoded = custom.encode();
assert_eq!(encoded, "Custom:ProcessData");
// Work with channels
let msg_channel = ChannelType::Message;
println!("Channel: {}", msg_channel);Enums§
- Channel
Type - Identifies the type of data channel used for state management.
- Node
Kind - Identifies the type of a node within a workflow graph.