pub enum ConfigSlotKind {
Endpoint,
Secret,
AuthMode,
}Expand description
The kind of a declared [[config_slots]] entry — a CLOSED vocabulary.
Deliberately an enum rather than a free String. A free string lets a typo
(kind = "endpont") parse cleanly, survive
ServerConfig::validate, and fail only at package time when it maps to no
slot type — the failure surfacing two crates away from its cause. As a closed
enum, an unrecognized discriminator is a serde parse error naming the
accepted set, and a fourth kind becomes a deliberate addition here rather
than a silent pass-through.
§Why this type is toolkit-LOCAL
The three snake_case discriminators (endpoint, secret, auth_mode)
are deliberately the same strings the pmcp-package slot-type discriminator
uses for the corresponding variants, so a packaging tool can compare a
declaration against a package slot without either crate depending on the
other. The toolkit must NOT depend on pmcp-package: that crate is the
workspace-excluded leaf, and a toolkit dependency on it inverts the layering.
The agreement is enforced by the package side re-parsing the SAME config
bytes, not by a shared type.
Variants§
Endpoint
A network endpoint the target environment must supply (e.g. the backend
API root). Behaviour-relevant: its tested_value records the endpoint
the package was tested against.
Secret
A named secret the target environment must supply (e.g. an API key).
Identity-bearing: it structurally carries no tested_value.
AuthMode
The backend authentication MODE. Structural rather than value-bearing:
the auth-mode key is a serde tag, so no ${VAR} placeholder form of it
can deserialize — the baked literal IS the default and deviation
surfaces through slot classification, not through a placeholder.
Trait Implementations§
Source§impl Clone for ConfigSlotKind
impl Clone for ConfigSlotKind
impl Copy for ConfigSlotKind
Source§impl Debug for ConfigSlotKind
impl Debug for ConfigSlotKind
Source§impl Default for ConfigSlotKind
impl Default for ConfigSlotKind
Source§impl<'de> Deserialize<'de> for ConfigSlotKind
impl<'de> Deserialize<'de> for ConfigSlotKind
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>,
impl Eq for ConfigSlotKind
Source§impl PartialEq for ConfigSlotKind
impl PartialEq for ConfigSlotKind
Source§impl Serialize for ConfigSlotKind
impl Serialize for ConfigSlotKind
impl StructuralPartialEq for ConfigSlotKind
Auto Trait Implementations§
impl Freeze for ConfigSlotKind
impl RefUnwindSafe for ConfigSlotKind
impl Send for ConfigSlotKind
impl Sync for ConfigSlotKind
impl Unpin for ConfigSlotKind
impl UnsafeUnpin for ConfigSlotKind
impl UnwindSafe for ConfigSlotKind
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more