pub struct ExtensionKey {
pub kind_path: String,
pub instance_id: Option<String>,
}Expand description
(kind_path, instance_id) composite key identifying one extension binding
in Environment::extensions. kind_path is the canonical
ExtensionKind::path() form (e.g. "capability/memory/long-term").
instance_id is Option<String>: a None binding (the unnamed default)
and a Some("default") binding on the same kind_path are distinct
and may coexist — two None bindings on the same path collide.
This mirrors ExtensionBinding::instance_id.
Serde shape (PR-4.2d): the key rides inside
ExtensionKeyedPayload on the
A8 wire as {"kind_path": …, "instance_id": …} — instance_id is
serialized explicitly (null for None, matching the PR-3b client’s
encoding) and tolerated absent on deserialize.
Fields§
§kind_path: String§instance_id: Option<String>Implementations§
Source§impl ExtensionKey
impl ExtensionKey
pub fn new(kind_path: impl Into<String>, instance_id: Option<String>) -> Self
Sourcepub fn from_binding(b: &ExtensionBinding) -> Self
pub fn from_binding(b: &ExtensionBinding) -> Self
Derive the key from an existing ExtensionBinding, mirroring the
(descriptor-path, instance_id) convention in the deployer CLI.
Sourcepub fn matches(&self, b: &ExtensionBinding) -> bool
pub fn matches(&self, b: &ExtensionBinding) -> bool
Whether b carries this (kind_path, instance_id) key. Borrowed
comparison — no allocation per element, so it’s cheap inside a scan.
Trait Implementations§
Source§impl Clone for ExtensionKey
impl Clone for ExtensionKey
Source§fn clone(&self) -> ExtensionKey
fn clone(&self) -> ExtensionKey
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExtensionKey
impl Debug for ExtensionKey
Source§impl<'de> Deserialize<'de> for ExtensionKey
impl<'de> Deserialize<'de> for ExtensionKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ExtensionKey
Wire-stable rendering used by audit-event targets and CLI outcome JSON.
<kind_path>/<instance_id> when an instance is present, otherwise just
<kind_path>. Mirrors the deployer CLI’s Display so existing
operator-facing strings stay byte-identical.
impl Display for ExtensionKey
Wire-stable rendering used by audit-event targets and CLI outcome JSON.
<kind_path>/<instance_id> when an instance is present, otherwise just
<kind_path>. Mirrors the deployer CLI’s Display so existing
operator-facing strings stay byte-identical.
impl Eq for ExtensionKey
Source§impl Hash for ExtensionKey
impl Hash for ExtensionKey
Source§impl PartialEq for ExtensionKey
impl PartialEq for ExtensionKey
Source§fn eq(&self, other: &ExtensionKey) -> bool
fn eq(&self, other: &ExtensionKey) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ExtensionKey
impl Serialize for ExtensionKey
impl StructuralPartialEq for ExtensionKey
Auto Trait Implementations§
impl Freeze for ExtensionKey
impl RefUnwindSafe for ExtensionKey
impl Send for ExtensionKey
impl Sync for ExtensionKey
impl Unpin for ExtensionKey
impl UnsafeUnpin for ExtensionKey
impl UnwindSafe for ExtensionKey
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request