pub struct GraphRuntime { /* private fields */ }Expand description
Orcha’s interface to the graph execution engine.
Serves as the factory for OrchaGraph handles. The lattice backend is
an implementation detail — callers only ever see OrchaGraph.
Implementations§
Source§impl GraphRuntime
impl GraphRuntime
pub fn new(storage: Arc<LatticeStorage>) -> Self
Sourcepub fn storage(&self) -> Arc<LatticeStorage>
pub fn storage(&self) -> Arc<LatticeStorage>
Expose the underlying lattice storage.
Sourcepub async fn create_graph(&self, metadata: Value) -> Result<OrchaGraph, String>
pub async fn create_graph(&self, metadata: Value) -> Result<OrchaGraph, String>
Create a new execution graph.
Sourcepub async fn create_child_graph(
&self,
parent_id: &str,
metadata: Value,
) -> Result<OrchaGraph, String>
pub async fn create_child_graph( &self, parent_id: &str, metadata: Value, ) -> Result<OrchaGraph, String>
Create a new execution graph as a child of an existing graph.
Sourcepub async fn build_child_graph(
&self,
parent_id: &str,
metadata: Value,
nodes: Vec<OrchaNodeDef>,
edges: Vec<OrchaEdgeDef>,
) -> Result<(String, HashMap<String, String>), String>
pub async fn build_child_graph( &self, parent_id: &str, metadata: Value, nodes: Vec<OrchaNodeDef>, edges: Vec<OrchaEdgeDef>, ) -> Result<(String, HashMap<String, String>), String>
Build a child graph from node+edge definitions.
Creates the child graph under parent_id, adds all nodes, and wires all edges.
Returns (child_graph_id, ticket_id→lattice_node_id map) on success.
Sourcepub fn open_graph(&self, graph_id: String) -> OrchaGraph
pub fn open_graph(&self, graph_id: String) -> OrchaGraph
Open an existing graph by ID.
Trait Implementations§
Source§impl Clone for GraphRuntime
impl Clone for GraphRuntime
Source§fn clone(&self) -> GraphRuntime
fn clone(&self) -> GraphRuntime
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 moreAuto Trait Implementations§
impl Freeze for GraphRuntime
impl !RefUnwindSafe for GraphRuntime
impl Send for GraphRuntime
impl Sync for GraphRuntime
impl Unpin for GraphRuntime
impl UnsafeUnpin for GraphRuntime
impl !UnwindSafe for GraphRuntime
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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