#[non_exhaustive]pub struct SheepConfigView {
pub name: String,
pub config: AppConfig,
pub env_keys: Vec<String>,
pub overridden: Vec<String>,
pub pending: Vec<String>,
}Expand description
One sheep’s effective config as a pane sees it: every field but env’s values, plus which fields an operator has overridden and which are waiting on a respawn.
The answer to Request::SheepConfig, and the one reply in this module
that carries a whole AppConfig. SheepApplied deliberately carries
field names alone, and the difference is what each is for: that one is
printed at an operator who already has the file, this one feeds a pane
that is about to edit fields it has to be able to show first.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe sheep’s name.
config: AppConfigThe effective config with env cleared. Every remaining field is
operator-supplied policy the pane is about to let them edit, so
withholding a value would make the pane unusable while protecting
nothing.
env_keys: Vec<String>The env keys, so the pane can list them. Never the values.
overridden: Vec<String>Field names an operator has set that the Flockfile does not declare.
pending: Vec<String>Field names parked until the next respawn.
Implementations§
Source§impl SheepConfigView
impl SheepConfigView
Sourcepub fn new(
config: AppConfig,
overridden: Vec<String>,
pending: Vec<String>,
) -> Self
pub fn new( config: AppConfig, overridden: Vec<String>, pending: Vec<String>, ) -> Self
Builds one, clearing env and recording its keys.
The clearing happens here rather than at the one call site, so a
second caller cannot forget it: this constructor is the only way to
build the type outside this crate, since #[non_exhaustive] blocks
a literal.
Trait Implementations§
Source§impl Clone for SheepConfigView
impl Clone for SheepConfigView
Source§fn clone(&self) -> SheepConfigView
fn clone(&self) -> SheepConfigView
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 SheepConfigView
Redacted (IR-41): config carries args and cwd, which routinely hold
a token or a home directory, and this type is what a {:?} on a
Response would print. The three lists are counted rather than named
for the same reason: env_keys is a key set, which is itself worth
keeping out of a log.
impl Debug for SheepConfigView
Redacted (IR-41): config carries args and cwd, which routinely hold
a token or a home directory, and this type is what a {:?} on a
Response would print. The three lists are counted rather than named
for the same reason: env_keys is a key set, which is itself worth
keeping out of a log.
Source§impl<'de> Deserialize<'de> for SheepConfigView
impl<'de> Deserialize<'de> for SheepConfigView
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 SheepConfigView
Source§impl PartialEq for SheepConfigView
impl PartialEq for SheepConfigView
Source§impl Serialize for SheepConfigView
impl Serialize for SheepConfigView
impl StructuralPartialEq for SheepConfigView
Auto Trait Implementations§
impl Freeze for SheepConfigView
impl RefUnwindSafe for SheepConfigView
impl Send for SheepConfigView
impl Sync for SheepConfigView
impl Unpin for SheepConfigView
impl UnsafeUnpin for SheepConfigView
impl UnwindSafe for SheepConfigView
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.