pub struct ConfigValue {
pub key: String,
pub value: String,
pub source: Option<Source>,
}Expand description
One resolved (or absent) driver-domain value, as config show renders it.
The key is the operator’s own spelling: a declared key
(session.chain_id, database.path), a per-chain endpoint entry
(nodes.ws[8453]), or a whole transport’s explicit slot (nodes.ws).
Fields§
§key: StringThe key as the operator writes it.
value: StringThe value, verbatim; (unresolved) is carried by the absent source
rather than a sentinel string.
source: Option<Source>The layer that supplied the value, or None when no layer did.
Implementations§
Source§impl ConfigValue
impl ConfigValue
Sourcepub fn unresolved(key: &str) -> Self
pub fn unresolved(key: &str) -> Self
A key no layer supplied: reported, never guessed and never omitted.
Sourcepub fn line(&self) -> String
pub fn line(&self) -> String
The key = value line (the file view). The value is redacted at
render time: the file keeps the operator’s bytes, but a rendered line
never prints a credential (ADR-062 D12).
Sourcepub fn resolved_line(&self) -> String
pub fn resolved_line(&self) -> String
The key = value (source) line (config show --resolved), redacted.
Trait Implementations§
Source§impl Clone for ConfigValue
impl Clone for ConfigValue
Source§impl Debug for ConfigValue
impl Debug for ConfigValue
impl Eq for ConfigValue
Source§impl PartialEq for ConfigValue
impl PartialEq for ConfigValue
impl StructuralPartialEq for ConfigValue
Auto Trait Implementations§
impl Freeze for ConfigValue
impl RefUnwindSafe for ConfigValue
impl Send for ConfigValue
impl Sync for ConfigValue
impl Unpin for ConfigValue
impl UnsafeUnpin for ConfigValue
impl UnwindSafe for ConfigValue
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,
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