pub enum Origin {
Scheduled,
Manual,
Discovered,
Adopted,
Replicated,
}Expand description
How a Snapshot came to exist. Canonical value mirrored from the
kopiur.home-operations.com/origin label. Origin drives the deletion-policy
default: discovered backups are forced to Retain because the operator did
not create those snapshots.
Variants§
Scheduled
Created by a SnapshotSchedule; spec carries policyRef.
Manual
Created by kubectl create / external automation; spec carries policyRef.
Discovered
Materialized by the catalog scan for a snapshot kopiur didn’t produce.
Adopted
A discovered snapshot whose resolved identity matched a live
SnapshotPolicy and was automatically (or explicitly) re-attached to
it: it now carries that policy’s config label and is retention-governed
like any produced row, even though the operator did not create the
underlying kopia snapshot.
Replicated
A destination-side copy CR minted by a SnapshotReplication run: the
kopia snapshot it represents was snapshot migrated from another
repository, not produced by a backup run here. Like discovered/
adopted it is catalog history — it must never enter the backup-run
machinery — but it is pruned only by its SnapshotReplication’s own
pruning mode, never by any policy’s GFS retention.
Implementations§
Source§impl Origin
impl Origin
Sourcepub const ALL: &'static [Self]
pub const ALL: &'static [Self]
Every variant, for the label-value ↔ parse round-trip
tests and consumer-side variant-count guards (e.g. the CLI’s
OriginFilter). A new variant added without extending this array fails
the round-trip test (and label_value/parse’s exhaustive matches
won’t compile until it is classified).
Source§impl Origin
impl Origin
Sourcepub fn label_value(self) -> &'static str
pub fn label_value(self) -> &'static str
The stable wire/label value (the serde camelCase encoding), for the
kopiur.home-operations.com/origin label and status.origin — single
definition so producers (controller, kubectl plugin) cannot drift.
Sourcepub fn parse(v: &str) -> Option<Self>
pub fn parse(v: &str) -> Option<Self>
Strict, TOTAL parse of an origin marker (the origin label /
status.origin wire value): None for anything unrecognized.
The single inverse of label_value, so string
matchers (the controller’s resolve_origin, the webhook’s
backup_origin) can never silently classify an unknown origin as a
known one. The pre-parse versions of both defaulted unknown strings to
Manual — which would have routed a row written by a NEWER operator
(e.g. replicated before this variant existed) into the backup-run
machinery and minted a mover Job for a snapshot this build does not
understand. Callers must treat None conservatively: warn + inert
handling, never Manual.
Trait Implementations§
impl Copy for Origin
Source§impl<'de> Deserialize<'de> for Origin
impl<'de> Deserialize<'de> for Origin
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 Origin
Source§impl JsonSchema for Origin
impl JsonSchema for Origin
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for Origin
Auto Trait Implementations§
impl Freeze for Origin
impl RefUnwindSafe for Origin
impl Send for Origin
impl Sync for Origin
impl Unpin for Origin
impl UnsafeUnpin for Origin
impl UnwindSafe for Origin
Blanket Implementations§
§impl<T> AnyExt for T
impl<T> AnyExt for T
§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
T behind reference§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
T behind mutable reference§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
T behind Rc pointer§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
T behind Arc pointer§fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
fn downcast_box<T>(this: Box<Self>) -> Result<Box<T>, Box<Self>>where
T: Any,
T behind Box pointer§fn downcast_move<T>(this: Self) -> Option<T>
fn downcast_move<T>(this: Self) -> Option<T>
Self to T,
useful only in generic context as a workaround for specializationSource§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,
§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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