pub struct Registry { /* private fields */ }Expand description
The set of primitives a workflow is permitted to reference. Anything not registered here is rejected at compile time — this IS the authz boundary for no-code workflows.
Implementations§
Source§impl Registry
impl Registry
Sourcepub fn with_model(self, id: impl Into<String>, llm: Arc<dyn LlmClient>) -> Self
pub fn with_model(self, id: impl Into<String>, llm: Arc<dyn LlmClient>) -> Self
Register an LLM client under id. Later registrations overwrite.
Sourcepub fn with_tool(self, id: impl Into<String>) -> Self
pub fn with_tool(self, id: impl Into<String>) -> Self
Allow a tool id. The tool impl itself is resolved at runtime via
the context’s ToolInvoker.
Sourcepub fn with_subflow(self, id: impl Into<String>, flow: Arc<dyn Flow>) -> Self
pub fn with_subflow(self, id: impl Into<String>, flow: Arc<dyn Flow>) -> Self
Register a prebuilt sub-flow under id.
Sourcepub fn allows_tool(&self, id: &str) -> bool
pub fn allows_tool(&self, id: &str) -> bool
Whether a tool id is allowed.
Sourcepub fn model_ids(&self) -> Vec<&str>
pub fn model_ids(&self) -> Vec<&str>
The id of every registered model, in unspecified order. The palette of models a workflow may name in an agent node.
Sourcepub fn tool_ids(&self) -> Vec<&str>
pub fn tool_ids(&self) -> Vec<&str>
The id of every allowed tool, in unspecified order. The palette of tools a workflow may invoke.
Sourcepub fn subflow_ids(&self) -> Vec<&str>
pub fn subflow_ids(&self) -> Vec<&str>
The id of every registered sub-flow, in unspecified order. The palette of sub-flows a workflow may reference.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Registry
impl !UnwindSafe for Registry
impl Freeze for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
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