#[non_exhaustive]pub enum ResetDepth {
None,
File,
Policy,
Env,
All,
}Expand description
How much of a Flockfile load overwrites what the operator has set since.
Two independent axes: whether env is reset, and whether a key the
template declares (or does not) is reset. Five of the six combinations
are named here; each variant’s own doc states its column values.
#[non_exhaustive] buys source compatibility only, forcing an
out-of-tree match to carry a wildcard arm. It does nothing for serde:
this enum has no #[serde(other)], so an older build fails to
deserialize a variant it predates with unknown variant.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
Append keys nobody established. Overwrite nothing. The default, because a Flockfile arrives from the app’s own repository.
env: kept. A key the template declares: kept, unless nobody has
established it yet, which is the append. A key it does not declare:
kept, since there is nothing to append it against.
File
Put back what the template declares, and nothing else.
env: kept. A key the template declares: reset. A key it does not
declare: kept, so an app stocked to four instances against a file
with no instances line keeps its count.
Policy
Put non-env settings back to the template, env kept. Every
setting goes back, declared or not, to the value a fresh start off
the template would give it: env is operator data, the rest is
operator-tuned policy, and resetting policy is recoverable while
resetting data is not.
env: kept. A key the template declares: reset. A key it does not
declare: reset too, to the template’s own default.
Env
Reset env back to the template and leave everything else alone.
Touches data, not policy: on the settings axis this behaves like
None, append included, since it widens a load rather than
narrowing one.
env: reset. A key the template declares: kept, save for the same
append None does. A key it does not declare: kept.
All
Put everything back to the template, env included, and drop the
override record.
env: reset. A key the template declares: reset. A key it does not
declare: reset too, to the template’s own default.
Trait Implementations§
Source§impl Clone for ResetDepth
impl Clone for ResetDepth
Source§fn clone(&self) -> ResetDepth
fn clone(&self) -> ResetDepth
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ResetDepth
Source§impl Debug for ResetDepth
impl Debug for ResetDepth
Source§impl Default for ResetDepth
impl Default for ResetDepth
Source§fn default() -> ResetDepth
fn default() -> ResetDepth
Source§impl<'de> Deserialize<'de> for ResetDepth
impl<'de> Deserialize<'de> for ResetDepth
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 ResetDepth
Source§impl PartialEq for ResetDepth
impl PartialEq for ResetDepth
Source§impl Serialize for ResetDepth
impl Serialize for ResetDepth
impl StructuralPartialEq for ResetDepth
Auto Trait Implementations§
impl Freeze for ResetDepth
impl RefUnwindSafe for ResetDepth
impl Send for ResetDepth
impl Sync for ResetDepth
impl Unpin for ResetDepth
impl UnsafeUnpin for ResetDepth
impl UnwindSafe for ResetDepth
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.