pub struct GraphDefinition {
pub id: String,
pub name: Option<String>,
pub entry_point: String,
pub nodes: Vec<NodeDefinition>,
pub edges: Vec<EdgeDefinition>,
pub routers: Vec<RouterDefinition>,
pub recursion_limit: usize,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub metadata: HashMap<String, Value>,
}Expand description
GraphDefinition - Serializable graph structure
Fields§
§id: StringUnique identifier
name: Option<String>Human-readable name
entry_point: StringEntry point node name
nodes: Vec<NodeDefinition>Node definitions
edges: Vec<EdgeDefinition>Edge definitions
routers: Vec<RouterDefinition>Router definitions
recursion_limit: usizeMaximum recursion limit
created_at: DateTime<Utc>Creation timestamp
updated_at: DateTime<Utc>Last update timestamp
metadata: HashMap<String, Value>Custom metadata
Implementations§
Source§impl GraphDefinition
impl GraphDefinition
Sourcepub fn new(entry_point: impl Into<String>) -> Self
pub fn new(entry_point: impl Into<String>) -> Self
Create a new graph definition with the given entry point
Sourcepub fn with_recursion_limit(self, limit: usize) -> Self
pub fn with_recursion_limit(self, limit: usize) -> Self
Set recursion limit
Sourcepub fn add_node(&mut self, node: NodeDefinition)
pub fn add_node(&mut self, node: NodeDefinition)
Add a node definition
Sourcepub fn add_edge(&mut self, edge: EdgeDefinition)
pub fn add_edge(&mut self, edge: EdgeDefinition)
Add an edge definition
Sourcepub fn add_router(&mut self, router: RouterDefinition)
pub fn add_router(&mut self, router: RouterDefinition)
Add a router definition
Trait Implementations§
Source§impl Clone for GraphDefinition
impl Clone for GraphDefinition
Source§fn clone(&self) -> GraphDefinition
fn clone(&self) -> GraphDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GraphDefinition
impl Debug for GraphDefinition
Source§impl<'de> Deserialize<'de> for GraphDefinition
impl<'de> Deserialize<'de> for GraphDefinition
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 GraphDefinition
impl RefUnwindSafe for GraphDefinition
impl Send for GraphDefinition
impl Sync for GraphDefinition
impl Unpin for GraphDefinition
impl UnsafeUnpin for GraphDefinition
impl UnwindSafe for GraphDefinition
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