pub struct CandidateHandlerRegistry { /* private fields */ }Expand description
Exact-name registry. Duplicate registration fails closed so a later family can never silently shadow a builtin.
Implementations§
Source§impl CandidateHandlerRegistry
impl CandidateHandlerRegistry
Sourcepub fn with_builtins() -> Self
pub fn with_builtins() -> Self
The builtin coding-domain execution surface, matching the base catalog’s executor-backed entries.
pub fn register( &mut self, name: impl Into<String>, handler: Arc<dyn CandidateToolHandler>, ) -> Result<()>
pub fn get(&self, name: &str) -> Option<&Arc<dyn CandidateToolHandler>>
Sourcepub fn set_fallback(&mut self, handler: Arc<dyn CandidateToolHandler>)
pub fn set_fallback(&mut self, handler: Arc<dyn CandidateToolHandler>)
Install the fallback handler for names with no exact registration.
pub fn has_fallback(&self) -> bool
Sourcepub fn resolve(&self, name: &str) -> Option<&Arc<dyn CandidateToolHandler>>
pub fn resolve(&self, name: &str) -> Option<&Arc<dyn CandidateToolHandler>>
Exact name first, then the fallback.
pub fn names(&self) -> impl Iterator<Item = &str>
Trait Implementations§
Source§impl Debug for CandidateHandlerRegistry
impl Debug for CandidateHandlerRegistry
Auto Trait Implementations§
impl Freeze for CandidateHandlerRegistry
impl !RefUnwindSafe for CandidateHandlerRegistry
impl Send for CandidateHandlerRegistry
impl Sync for CandidateHandlerRegistry
impl Unpin for CandidateHandlerRegistry
impl UnsafeUnpin for CandidateHandlerRegistry
impl !UnwindSafe for CandidateHandlerRegistry
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.