pub struct ClientCapabilityInfo {
pub sampling: bool,
pub elicitation: bool,
pub elicitation_form: bool,
pub elicitation_url: bool,
pub roots: bool,
pub roots_list_changed: bool,
}Expand description
Client capability information accessible from handlers.
This provides a simplified view of what capabilities the connected client supports. Use this to adapt handler behavior based on client capabilities.
Fields§
§sampling: boolWhether the client supports sampling (LLM completions).
elicitation: boolWhether the client supports elicitation (user input requests).
elicitation_form: boolWhether the client supports form-mode elicitation.
elicitation_url: boolWhether the client supports URL-mode elicitation.
roots: boolWhether the client supports roots listing.
roots_list_changed: boolWhether the client wants list_changed notifications for roots.
Implementations§
Source§impl ClientCapabilityInfo
impl ClientCapabilityInfo
Sourcepub fn with_sampling(self) -> Self
pub fn with_sampling(self) -> Self
Creates capability info with sampling enabled.
Sourcepub fn with_elicitation(self, form: bool, url: bool) -> Self
pub fn with_elicitation(self, form: bool, url: bool) -> Self
Creates capability info with elicitation enabled.
Sourcepub fn with_roots(self, list_changed: bool) -> Self
pub fn with_roots(self, list_changed: bool) -> Self
Creates capability info with roots enabled.
Trait Implementations§
Source§impl Clone for ClientCapabilityInfo
impl Clone for ClientCapabilityInfo
Source§fn clone(&self) -> ClientCapabilityInfo
fn clone(&self) -> ClientCapabilityInfo
Returns a duplicate of the value. Read more
1.0.0 · 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 ClientCapabilityInfo
impl Debug for ClientCapabilityInfo
Source§impl Default for ClientCapabilityInfo
impl Default for ClientCapabilityInfo
Source§fn default() -> ClientCapabilityInfo
fn default() -> ClientCapabilityInfo
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ClientCapabilityInfo
impl RefUnwindSafe for ClientCapabilityInfo
impl Send for ClientCapabilityInfo
impl Sync for ClientCapabilityInfo
impl Unpin for ClientCapabilityInfo
impl UnwindSafe for ClientCapabilityInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).