pub struct ConfigSlotDecl {
pub key: String,
pub kind: ConfigSlotKind,
pub name: String,
pub tested_value: Option<String>,
}Expand description
Single [[config_slots]] entry — a config value the TARGET environment must
fill for this server to run.
A Shape A server’s whole identity is its config, so “what must the operator
supply?” has to be declarable IN that config rather than discovered by
grepping for ${...}. This block is that declaration: it names the config
path, the kind of thing it is, and the value exercised when the server was
tested.
Additive per the REF-01 superset invariant — a config omitting the block
parses to an empty ServerConfig::config_slots. Strict-parse discipline
(D-13) applies: #[serde(deny_unknown_fields)] rejects a typo’d inner key.
§Example
[[config_slots]]
key = "backend.base_url"
kind = "endpoint"
name = "TFL_BASE_URL"
tested_value = "https://api.tfl.gov.uk"Fields§
§key: StringThe dotted TOML path this slot fills, e.g. backend.base_url,
backend.auth.query_params.app_key, backend.auth.type.
kind: ConfigSlotKindThe slot kind (ConfigSlotKind — a closed vocabulary). REQUIRED: an
entry omitting kind is a parse error, because a defaulted kind would
silently mis-classify the slot.
name: StringThe slot’s declared name — for a secret, the environment-variable
name; for an endpoint, the variable the ${VAR} placeholder reads.
tested_value: Option<String>The value exercised when the server was tested. None for
identity-bearing slots (a secret), which structurally carry no value —
ENFORCED by ServerConfig::validate, not just stated: a secret
entry carrying a tested_value is refused, because that field is the
one place a real credential could sit in a config that is served but
never packed.
Trait Implementations§
Source§impl Clone for ConfigSlotDecl
impl Clone for ConfigSlotDecl
Source§fn clone(&self) -> ConfigSlotDecl
fn clone(&self) -> ConfigSlotDecl
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 ConfigSlotDecl
impl Debug for ConfigSlotDecl
Source§impl Default for ConfigSlotDecl
impl Default for ConfigSlotDecl
Source§fn default() -> ConfigSlotDecl
fn default() -> ConfigSlotDecl
Source§impl<'de> Deserialize<'de> for ConfigSlotDecl
impl<'de> Deserialize<'de> for ConfigSlotDecl
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 ConfigSlotDecl
Source§impl PartialEq for ConfigSlotDecl
impl PartialEq for ConfigSlotDecl
Source§impl Serialize for ConfigSlotDecl
impl Serialize for ConfigSlotDecl
impl StructuralPartialEq for ConfigSlotDecl
Auto Trait Implementations§
impl Freeze for ConfigSlotDecl
impl RefUnwindSafe for ConfigSlotDecl
impl Send for ConfigSlotDecl
impl Sync for ConfigSlotDecl
impl Unpin for ConfigSlotDecl
impl UnsafeUnpin for ConfigSlotDecl
impl UnwindSafe for ConfigSlotDecl
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