pub struct Document(/* private fields */);Expand description
A resolved configuration section.
§Debug prints shape, never values
Hand-written for the reason Snapshot and Value are: this type holds
the resolved configuration, passwords included, and {:?} in a log line
is exactly how a resolved secret escapes. The values leave this process
through one door — the document endpoint — and a Debug that rendered
them would quietly open a second.
Implementations§
Source§impl Document
impl Document
Sourcepub fn leaf_paths(&self) -> Vec<String>
pub fn leaf_paths(&self) -> Vec<String>
The dotted path of every leaf, in order.
The same walk Snapshot::leaf_paths
performs, and for the same purpose: a caller that wants to know
which keys exist without being handed what is in them. An array is
a leaf — its elements are values, not configuration keys — and so is
an empty table, which would otherwise vanish from the listing
entirely.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Document
impl<'de> Deserialize<'de> for Document
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Document
impl UnwindSafe for Document
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
Mutably borrows from an owned value. Read more