pub struct FluxResourceRef {
pub api_version: String,
pub kind: String,
pub name: String,
pub namespace: String,
pub ready: bool,
pub message: Option<String>,
pub last_check: Option<DateTime<Utc>>,
}Expand description
Reference to a FluxCD resource emitted as part of this Process.
Fields§
§api_version: String§kind: String§name: String§namespace: String§ready: bool§message: Option<String>§last_check: Option<DateTime<Utc>>Implementations§
Source§impl FluxResourceRef
impl FluxResourceRef
Sourcepub fn fetch_coords(&self) -> (&str, &str, &str, &str)
pub fn fetch_coords(&self) -> (&str, &str, &str, &str)
Pure typed projection of the four fetch coordinates
(namespace, api_version, kind, name) every consumer that
dispatches this persisted reference through kube-rs’s dynamic-
object surface splats by hand pre-lift. The 4-tuple binds the
slot order at ONE typed accessor so a copy-paste at any downstream
consumer cannot swap two adjacent &str slots in the fetch call.
Peer projection to
crate::k8s_wire_identity::K8sWireIdentity on the static-
identity axis: [K8sWireIdentity] carries a
(&'static str, &'static str) closed-set variant’s pair for
emit-time (RENDER phase) composition; this method carries the
full (ns, apiVersion, kind, name) 4-slot borrow for fetch-time
(VERIFY / ATTEST-heartbeat) composition where the ref’s payload
comes back off the persisted ProcessStatus.flux_resources
slice with owned Strings rather than static literals. The two
primitives partition the fetch axis by whether the caller starts
from a closed-set variant (emit-time) or a persisted status
slice (fetch-time).
Pre-lift the 5-slot ssapply::fetch(client, &r.namespace, &r.api_version, &r.kind, &r.name) splat was hand-authored at
TWO sites past the ★★ PRIME-DIRECTIVE ≥ 2 duplication threshold
in tatara-reconciler::phase_machine:
handle_running— the VERIFY-phase per-ref readiness probe that populates the updatedFluxResourceRefslice withready+message+last_check.handle_attested— the ATTEST-heartbeat drift detector that short-circuits on the first non-Ready ref.
Both sites splatted the SAME four &r.X field borrows in the
SAME order into raw ssapply::fetch. A copy-paste that swapped
two adjacent &str slots (&r.api_version and &r.kind are
both strings that look interchangeable to a mechanical
substitution) would silently 404 at wire time and diagnose as a
broken CRD rather than as slot skew at the callsite. Post-lift
each site names the ref ONCE and unpacks it through this ONE
projection; the slot order binds structurally at the tuple
return so a caller cannot desync one axis.
A future addition (a case-fold normalization on the group, a
virtual-cluster prefix rewrite for multi-tenancy, a
generateName fallback on the name slot, a cluster-cache
short-circuit inserted between the projection and the fetch
call) lands at this ONE method and every downstream fetch
consumer inherits the upgrade mechanically — no per-site edit
at handle_running / handle_attested / any future kenshi-
runner / mirror-audit / drift-probe consumer that grows a third
consumer.
Return-order pin lives at
[tests::flux_resource_ref_fetch_coords_binds_slots_by_position]
so a regression that swapped namespace and api_version
(both String, same type) inside the tuple constructor fails-
loudly here rather than as a silent wire-time 404 at every
downstream fetch consumer.
Theory grounding: THEORY.md §II.1 invariant 5 (composition
preserves proofs — the 4-tuple slot order binds at ONE typed
projection so a regression across the two fields of the same
String type fails at the projection’s positional pin rather
than at every downstream fetch consumer). THEORY.md §VI.1
(generation over composition — the 5-slot splat recurred at
two hand-authored sites past the ≥ 2 duplication trigger, and
is lifted to ONE typed borrow-projection here).
Trait Implementations§
Source§impl Clone for FluxResourceRef
impl Clone for FluxResourceRef
Source§fn clone(&self) -> FluxResourceRef
fn clone(&self) -> FluxResourceRef
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 FluxResourceRef
impl Debug for FluxResourceRef
Source§impl<'de> Deserialize<'de> for FluxResourceRef
impl<'de> Deserialize<'de> for FluxResourceRef
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>,
Source§impl JsonSchema for FluxResourceRef
impl JsonSchema for FluxResourceRef
Source§fn schema_name() -> String
fn schema_name() -> String
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 is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for FluxResourceRef
impl RefUnwindSafe for FluxResourceRef
impl Send for FluxResourceRef
impl Sync for FluxResourceRef
impl Unpin for FluxResourceRef
impl UnsafeUnpin for FluxResourceRef
impl UnwindSafe for FluxResourceRef
Blanket Implementations§
impl<T> AppData for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
impl<T> AppDataResponse for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
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
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreimpl<T> OptionalSend for T
impl<T> OptionalSync for T
Source§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);