pub struct GraphRegistry { /* private fields */ }Expand description
The set of graphs this server hosts — the Rust analog of the graphs map
in LangGraph’s langgraph.json. Registration is compile-checked in user
code; a GraphRegistry is heterogeneous (each entry carries its own
StateSpec), which is safe because State is a JSON map at runtime.
Implementations§
Source§impl GraphRegistry
impl GraphRegistry
pub fn new() -> Self
Sourcepub fn register(
&mut self,
name: impl Into<String>,
graph: Graph,
spec: StateSpec,
) -> &mut Self
pub fn register( &mut self, name: impl Into<String>, graph: Graph, spec: StateSpec, ) -> &mut Self
Register a compiled graph under name, together with the state spec
the executor should merge its node updates through. Re-registering a
name replaces the previous entry.
Sourcepub fn channel_names(&self, name: &str) -> Vec<String>
pub fn channel_names(&self, name: &str) -> Vec<String>
The declared channel names of a registered graph’s spec, sorted.
Trait Implementations§
Source§impl Clone for GraphRegistry
impl Clone for GraphRegistry
Source§impl Debug for GraphRegistry
impl Debug for GraphRegistry
Auto Trait Implementations§
impl !RefUnwindSafe for GraphRegistry
impl !UnwindSafe for GraphRegistry
impl Freeze for GraphRegistry
impl Send for GraphRegistry
impl Sync for GraphRegistry
impl Unpin for GraphRegistry
impl UnsafeUnpin for GraphRegistry
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