pub struct DeclaredApp {
pub config: AppConfig,
pub declared: BTreeSet<String>,
pub declared_env: BTreeSet<String>,
}Expand description
One app as the document declared it: the validated config, plus the keys the document literally wrote.
The key set cannot be recovered from AppConfig afterwards.
#[serde(default)] gives every field a value, so a document naming four
keys deserializes identically to one naming forty. A later merge into a
running flock keys on what a template CLAIMS rather than on what its
values are, so the claim has to be carried out of the parser (see
Flockfile::parse_declared).
Serialize/Deserialize because this type is meant to travel inside a
wire request; the key sets are the whole reason such a request carries
this rather than a bare AppConfig.
Derived Debug does not reach for AppConfig::env’s values: config’s
own manual Debug already redacts them (IR-41), and declared_env holds
only the env table’s key NAMES, never the values behind them.
Fields§
§config: AppConfigThe app, validated the same way Flockfile::parse validates one
declared: BTreeSet<String>Top-level keys this app’s table wrote, whatever their values
declared_env: BTreeSet<String>Keys inside this app’s env table. Empty when env was not declared.
Trait Implementations§
Source§impl Clone for DeclaredApp
impl Clone for DeclaredApp
Source§fn clone(&self) -> DeclaredApp
fn clone(&self) -> DeclaredApp
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 DeclaredApp
impl Debug for DeclaredApp
Source§impl<'de> Deserialize<'de> for DeclaredApp
impl<'de> Deserialize<'de> for DeclaredApp
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 DeclaredApp
Source§impl PartialEq for DeclaredApp
impl PartialEq for DeclaredApp
Source§impl Serialize for DeclaredApp
impl Serialize for DeclaredApp
impl StructuralPartialEq for DeclaredApp
Auto Trait Implementations§
impl Freeze for DeclaredApp
impl RefUnwindSafe for DeclaredApp
impl Send for DeclaredApp
impl Sync for DeclaredApp
impl Unpin for DeclaredApp
impl UnsafeUnpin for DeclaredApp
impl UnwindSafe for DeclaredApp
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
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.