pub struct IdentityInputs<'a> {
pub object_name: &'a str,
pub namespace: &'a str,
pub overrides: Option<&'a Identity>,
pub defaults: Option<&'a IdentityDefaults>,
pub labels: Option<&'a BTreeMap<String, String>>,
pub annotations: Option<&'a BTreeMap<String, String>>,
pub source_path: Option<&'a str>,
}Expand description
Inputs to identity resolution. Grouped into a struct so call sites are readable and future inputs slot in without churning the signature.
Fields§
§object_name: &'a strThe consumer object’s metadata.name (default username; the policyName
CEL variable).
namespace: &'a strThe consumer object’s namespace (default hostname; the namespace CEL
variable).
overrides: Option<&'a Identity>Explicit overrides from SnapshotPolicy.spec.identity, if any.
defaults: Option<&'a IdentityDefaults>The referenced repository’s spec.identityDefaults — Repository or
ClusterRepository, whichever the consumer targets. Carries the CEL
*Expr pair (hostnameExpr/usernameExpr) AND cluster, the
multi-cluster hostname-default suffix (see IdentityDefaults::cluster
and the module’s “Multi-cluster hostname default” section).
labels: Option<&'a BTreeMap<String, String>>The consumer’s metadata.labels, exposed to CEL as labels.
annotations: Option<&'a BTreeMap<String, String>>The consumer’s metadata.annotations, exposed to CEL as annotations.
source_path: Option<&'a str>The kopia sourcePath to record, fully derived by the caller.
Deliberately ONE field rather than the pvc_name / default_source_path
/ source_path_override triple it replaces. Those three invited every
identity site to re-derive the path inline from a source’s pvc/nfs,
and five of them therefore resolved a pathless identity for a stream
source while the backup side recorded /stream/<fileName> (#451). With
only the answer accepted here, a caller MUST go through
crate::expand::identity_source_path — the single derivation — so a new
source kind cannot silently resolve the wrong path at some sites and the
right one at others.
None leaves sourcePath unset: kopia’s identity-only
username@hostname form, which matches any path. Used by surfaces that
genuinely have no single source path (a maintenance identity, a selector
policy with no fan-out pin, a zero-source legacy policy).
Trait Implementations§
Source§impl<'a> Clone for IdentityInputs<'a>
impl<'a> Clone for IdentityInputs<'a>
Source§fn clone(&self) -> IdentityInputs<'a>
fn clone(&self) -> IdentityInputs<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for IdentityInputs<'a>
impl<'a> RefUnwindSafe for IdentityInputs<'a>
impl<'a> Send for IdentityInputs<'a>
impl<'a> Sync for IdentityInputs<'a>
impl<'a> Unpin for IdentityInputs<'a>
impl<'a> UnsafeUnpin for IdentityInputs<'a>
impl<'a> UnwindSafe for IdentityInputs<'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