pub struct HostToolRegistry { /* private fields */ }Expand description
Immutable host tool definitions available to admission.
Implementations§
Source§impl HostToolRegistry
impl HostToolRegistry
Sourcepub fn build(tools: Vec<RegisteredTool>) -> Result<Self, StartupError>
pub fn build(tools: Vec<RegisteredTool>) -> Result<Self, StartupError>
Build from registered tools; rejects duplicate ids/names.
Every entry already carries a [ToolCancellationPolicy] on its spec
(validated by ToolSpec::try_new); unstoppable handlers are rejected
by not offering that policy.
Sourcepub fn get(&self, id: &ToolId) -> Option<&RegisteredTool>
pub fn get(&self, id: &ToolId) -> Option<&RegisteredTool>
Lookup registered tool by id.
Sourcepub fn id_for_name(&self, name: &ToolName) -> Option<&ToolId>
pub fn id_for_name(&self, name: &ToolName) -> Option<&ToolId>
Resolve name to id.
Sourcepub fn specs_sorted(&self) -> Vec<&ToolSpec>
pub fn specs_sorted(&self) -> Vec<&ToolSpec>
Specs sorted by tool id (deterministic projection).
Trait Implementations§
Source§impl Clone for HostToolRegistry
impl Clone for HostToolRegistry
Source§fn clone(&self) -> HostToolRegistry
fn clone(&self) -> HostToolRegistry
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 HostToolRegistry
impl Debug for HostToolRegistry
Source§impl Default for HostToolRegistry
impl Default for HostToolRegistry
Source§fn default() -> HostToolRegistry
fn default() -> HostToolRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for HostToolRegistry
impl !UnwindSafe for HostToolRegistry
impl Freeze for HostToolRegistry
impl Send for HostToolRegistry
impl Sync for HostToolRegistry
impl Unpin for HostToolRegistry
impl UnsafeUnpin for HostToolRegistry
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