pub struct CapabilityMatcher { /* private fields */ }
Expand description
Capability matcher for negotiating features between client and server
Implementations§
Source§impl CapabilityMatcher
impl CapabilityMatcher
Sourcepub fn add_rule(&mut self, feature: &str, rule: CompatibilityRule)
pub fn add_rule(&mut self, feature: &str, rule: CompatibilityRule)
Add a compatibility rule for a feature
Sourcepub fn set_default(&mut self, feature: &str, enabled: bool)
pub fn set_default(&mut self, feature: &str, enabled: bool)
Set default state for a feature
Sourcepub fn is_compatible(
&self,
feature: &str,
client: &ClientCapabilities,
server: &ServerCapabilities,
) -> bool
pub fn is_compatible( &self, feature: &str, client: &ClientCapabilities, server: &ServerCapabilities, ) -> bool
Check if a feature is compatible between client and server
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
Trait Implementations§
Source§impl Clone for CapabilityMatcher
impl Clone for CapabilityMatcher
Source§fn clone(&self) -> CapabilityMatcher
fn clone(&self) -> CapabilityMatcher
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 CapabilityMatcher
impl Debug for CapabilityMatcher
Auto Trait Implementations§
impl Freeze for CapabilityMatcher
impl RefUnwindSafe for CapabilityMatcher
impl Send for CapabilityMatcher
impl Sync for CapabilityMatcher
impl Unpin for CapabilityMatcher
impl UnwindSafe for CapabilityMatcher
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