Skip to main content

NegotiatedExtensionSet

Struct NegotiatedExtensionSet 

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

Frozen per-request extension state derived from both peers’ current settings.

Implementations§

Source§

impl NegotiatedExtensionSet

Source

pub const fn registry_receipt(&self) -> &ExtensionRegistryReceipt

Returns the registry receipt that this set is bound to.

Source

pub const fn protocol_era(&self) -> ProtocolEra

Returns the exact modern protocol era that produced this request state.

Source

pub fn active(&self, id: &ExtensionId) -> Option<&NegotiatedExtension>

Returns a negotiated extension when it is active for this exchange.

Source

pub fn inactive_reason( &self, id: &ExtensionId, ) -> Option<ExtensionInactiveReason>

Returns the recorded non-activating outcome for a registered descriptor.

Source

pub fn active_extensions( &self, ) -> impl ExactSizeIterator<Item = &NegotiatedExtension>

Returns enabled descriptors in deterministic identifier order.

Source

pub fn mcp_apps_activation_receipt( &self, registry: &ExtensionDescriptorRegistry, ) -> Option<McpAppsActivationReceipt>

Derives the sole receipt accepted by the Apps Host/View bridge for this current negotiated exchange.

The receipt is unavailable for a legacy exchange, a different frozen registry, inactive Apps settings, or any descriptor that differs from the frozen official method-free Apps descriptor.

Source

pub const fn unknown_client_extensions( &self, ) -> &BTreeMap<ExtensionId, ExtensionSettings>

Returns unknown current-message client settings preserved only for diagnostics.

Source

pub const fn unknown_server_extensions( &self, ) -> &BTreeMap<ExtensionId, ExtensionSettings>

Returns unknown server discovery settings preserved only for diagnostics.

Source§

impl NegotiatedExtensionSet

Source

pub fn admit_capability<'a>( &self, registry: &'a ExtensionDescriptorRegistry, request_era: ProtocolEra, capability: &ExtensionId, ) -> Result<&'a ExtensionDescriptor, ExtensionDispatchError>

Admits an active extension capability for one modern request.

Source

pub fn admit_method<'a>( &self, registry: &'a ExtensionDescriptorRegistry, request_era: ProtocolEra, capability: &ExtensionId, name: &str, direction: ExtensionDirection, ) -> Result<&'a ExtensionDescriptor, ExtensionDispatchError>

Admits a method owned by an active capability for one modern request.

Source

pub fn admit_notification<'a>( &self, registry: &'a ExtensionDescriptorRegistry, request_era: ProtocolEra, capability: &ExtensionId, name: &str, direction: ExtensionDirection, ) -> Result<&'a ExtensionDescriptor, ExtensionDispatchError>

Admits a notification owned by an active capability for one modern request.

Source

pub fn admit_result_discriminator<'a>( &self, registry: &'a ExtensionDescriptorRegistry, request_era: ProtocolEra, capability: &ExtensionId, discriminator: &str, ) -> Result<&'a ExtensionDescriptor, ExtensionDispatchError>

Admits a result discriminator owned by an active capability for one modern request.

Trait Implementations§

Source§

impl Clone for NegotiatedExtensionSet

Source§

fn clone(&self) -> NegotiatedExtensionSet

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NegotiatedExtensionSet

Source§

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

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

impl PartialEq for NegotiatedExtensionSet

Source§

fn eq(&self, other: &NegotiatedExtensionSet) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for NegotiatedExtensionSet

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, _span: NoopSpan) -> Self

Instruments this future with a span (no-op when disabled).
Source§

fn in_current_span(self) -> Self

Instruments this future with the current span (no-op when disabled).
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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