EnhancedRegistry

Struct EnhancedRegistry 

Source
pub struct EnhancedRegistry { /* private fields */ }
Expand description

Enhanced registry with handler support

Implementations§

Source§

impl EnhancedRegistry

Source

pub fn new() -> Self

Create a new enhanced registry

Source

pub fn register_elicitation_handler( &self, name: impl Into<String>, handler: Arc<dyn ElicitationHandler>, ) -> Result<(), RegistryError>

Register an elicitation handler

Source

pub fn get_elicitation_handler( &self, name: &str, ) -> Option<Arc<dyn ElicitationHandler>>

Get an elicitation handler

Source

pub fn list_elicitation_handlers(&self) -> Vec<String>

List all elicitation handlers

Source

pub fn register_completion_provider( &self, name: impl Into<String>, provider: Arc<dyn CompletionProvider>, ) -> Result<(), RegistryError>

Register a completion provider

Source

pub fn get_completion_provider( &self, name: &str, ) -> Option<Arc<dyn CompletionProvider>>

Get a completion provider

Source

pub fn get_matching_completion_providers( &self, context: &CompletionContext, ) -> Vec<Arc<dyn CompletionProvider>>

Get all completion providers that can handle a context

Source

pub fn register_template_handler( &self, name: impl Into<String>, handler: Arc<dyn ResourceTemplateHandler>, ) -> Result<(), RegistryError>

Register a resource template handler

Source

pub fn get_template_handler( &self, name: &str, ) -> Option<Arc<dyn ResourceTemplateHandler>>

Get a resource template handler

Source

pub fn register_ping_handler( &self, name: impl Into<String>, handler: Arc<dyn PingHandler>, ) -> Result<(), RegistryError>

Register a ping handler

Source

pub fn get_ping_handler(&self, name: &str) -> Option<Arc<dyn PingHandler>>

Get a ping handler

Source

pub fn get_capabilities(&self, name: &str) -> Option<HandlerCapabilities>

Get handler capabilities for a component

Source

pub fn find_by_capabilities( &self, filter: impl Fn(&HandlerCapabilities) -> bool, ) -> Vec<String>

Get all components with specific capabilities

Source

pub fn clear_handlers(&self)

Clear all handlers

Source

pub fn handler_stats(&self) -> HandlerStats

Get handler statistics

Source

pub fn base(&self) -> &Registry

Access the base registry

Trait Implementations§

Source§

impl Debug for EnhancedRegistry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EnhancedRegistry

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V