pub struct NegotiatedExtensions { /* private fields */ }Expand description
Protocol extensions declared by both the client and server.
This is inserted into each RequestContext, so
handlers and per-capability middleware can make extension-specific policy
decisions without inspecting raw capability maps.
Implementations§
Source§impl NegotiatedExtensions
impl NegotiatedExtensions
Sourcepub fn from_capabilities(
client: &ClientCapabilities,
server: &ServerCapabilities,
) -> Self
pub fn from_capabilities( client: &ClientCapabilities, server: &ServerCapabilities, ) -> Self
Compute the exact identifier intersection of two capability maps.
Sourcepub fn get(&self, identifier: &str) -> Option<&NegotiatedExtension>
pub fn get(&self, identifier: &str) -> Option<&NegotiatedExtension>
Return the negotiated declaration for an extension identifier.
Sourcepub fn contains(&self, identifier: &str) -> bool
pub fn contains(&self, identifier: &str) -> bool
Return whether both peers declared an extension identifier.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&str, &NegotiatedExtension)>
pub fn iter(&self) -> impl Iterator<Item = (&str, &NegotiatedExtension)>
Iterate over negotiated extensions in identifier order.
Trait Implementations§
Source§impl Clone for NegotiatedExtensions
impl Clone for NegotiatedExtensions
Source§fn clone(&self) -> NegotiatedExtensions
fn clone(&self) -> NegotiatedExtensions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NegotiatedExtensions
impl Debug for NegotiatedExtensions
Source§impl Default for NegotiatedExtensions
impl Default for NegotiatedExtensions
Source§fn default() -> NegotiatedExtensions
fn default() -> NegotiatedExtensions
Returns the “default value” for a type. Read more
Source§impl PartialEq for NegotiatedExtensions
impl PartialEq for NegotiatedExtensions
impl StructuralPartialEq for NegotiatedExtensions
Auto Trait Implementations§
impl Freeze for NegotiatedExtensions
impl RefUnwindSafe for NegotiatedExtensions
impl Send for NegotiatedExtensions
impl Sync for NegotiatedExtensions
impl Unpin for NegotiatedExtensions
impl UnsafeUnpin for NegotiatedExtensions
impl UnwindSafe for NegotiatedExtensions
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