pub enum SourceShape<'a> {
Pvc(&'a PvcSource),
PvcSelector(&'a PvcSelector),
Nfs(&'a NfsVolume),
Stream(&'a StreamSource),
}Expand description
The four mutually-exclusive forms a Source can take, resolved from its
sibling Options.
THE point of this type: Source must stay a struct of Options on the wire (the
forms share sourcePath*/readOnly keys), but every reconcile path matches on
this enum EXHAUSTIVELY — so a fifth source form cannot compile until backup Job
construction, validation, and identity resolution each account for it. Borrowed,
so callers match without cloning.
Not to be confused with the private expand::SourceShape, a narrower classifier
used only by restore_source_path: that one
answers “can this source’s kopia path be derived from the restore’s target PVC?”,
keeps only the fields that decision needs, and tolerates a malformed stored object
with an Invalid arm where this resolver returns a
ValidationError. Adding a form here means adding
an arm there.
Variants§
Pvc(&'a PvcSource)
One PVC named directly.
PvcSelector(&'a PvcSelector)
A label/namespace selector matching many PVCs (fans out into child Snapshots).
Nfs(&'a NfsVolume)
An inline NFS export read directly.
Stream(&'a StreamSource)
A command whose stdout is captured as one virtual file.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for SourceShape<'a>
impl<'a> Clone for SourceShape<'a>
Source§fn clone(&self) -> SourceShape<'a>
fn clone(&self) -> SourceShape<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for SourceShape<'a>
Source§impl<'a> Debug for SourceShape<'a>
impl<'a> Debug for SourceShape<'a>
Source§impl<'a> PartialEq for SourceShape<'a>
impl<'a> PartialEq for SourceShape<'a>
Source§fn eq(&self, other: &SourceShape<'a>) -> bool
fn eq(&self, other: &SourceShape<'a>) -> bool
self and other values to be equal, and is used by ==.impl<'a> StructuralPartialEq for SourceShape<'a>
Auto Trait Implementations§
impl<'a> Freeze for SourceShape<'a>
impl<'a> RefUnwindSafe for SourceShape<'a>
impl<'a> Send for SourceShape<'a>
impl<'a> Sync for SourceShape<'a>
impl<'a> Unpin for SourceShape<'a>
impl<'a> UnsafeUnpin for SourceShape<'a>
impl<'a> UnwindSafe for SourceShape<'a>
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> 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