pub struct CapabilityNegotiator { /* private fields */ }
Expand description
Capability negotiator for handling the negotiation process
Implementations§
Source§impl CapabilityNegotiator
impl CapabilityNegotiator
Sourcepub const fn new(matcher: CapabilityMatcher) -> Self
pub const fn new(matcher: CapabilityMatcher) -> Self
Create a new capability negotiator
Sourcepub const fn with_strict_mode(self) -> Self
pub const fn with_strict_mode(self) -> Self
Enable strict mode (fail on any incompatible feature)
Sourcepub fn negotiate(
&self,
client: &ClientCapabilities,
server: &ServerCapabilities,
) -> Result<CapabilitySet, CapabilityError>
pub fn negotiate( &self, client: &ClientCapabilities, server: &ServerCapabilities, ) -> Result<CapabilitySet, CapabilityError>
Negotiate capabilities between client and server
Sourcepub fn is_feature_enabled(capability_set: &CapabilitySet, feature: &str) -> bool
pub fn is_feature_enabled(capability_set: &CapabilitySet, feature: &str) -> bool
Check if a specific feature is enabled in the capability set
Sourcepub fn get_enabled_features(capability_set: &CapabilitySet) -> Vec<String>
pub fn get_enabled_features(capability_set: &CapabilitySet) -> Vec<String>
Get all enabled features as a sorted vector
Trait Implementations§
Source§impl Clone for CapabilityNegotiator
impl Clone for CapabilityNegotiator
Source§fn clone(&self) -> CapabilityNegotiator
fn clone(&self) -> CapabilityNegotiator
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 CapabilityNegotiator
impl Debug for CapabilityNegotiator
Auto Trait Implementations§
impl Freeze for CapabilityNegotiator
impl RefUnwindSafe for CapabilityNegotiator
impl Send for CapabilityNegotiator
impl Sync for CapabilityNegotiator
impl Unpin for CapabilityNegotiator
impl UnwindSafe for CapabilityNegotiator
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