pub enum FluxResource {
Kustomization,
HelmRelease,
OCIRepository,
}Expand description
Closed set of FluxCD resource kinds this repo’s reconciler emits or consumes at the wire. The three variants partition the current Flux-facing surface:
Kustomization—kustomize-controllerreconciles a set of K8s manifests from a source (GitRepository/OCIRepository). Emitted bycrate::intent::FluxIntent; consumed byConditionKind::KustomizationHealthy.HelmRelease—helm-controllerinstalls / upgrades a Helm chart from a source. Emitted bycrate::intent::AplicacaoIntent; consumed byConditionKind::HelmReleaseReleased.OCIRepository—source-controllerpulls a chart from an OCI registry. Emitted bycrate::intent::AplicacaoIntentforoci://chart refs, referenced by the sibling HelmRelease’schartRefslot.
Every variant carries a stable (api_version, kind) pair through
its typed projections; both projections are const fn so the
pair reduces to a &'static str slot at every callsite with no
runtime overhead.
Variants§
Implementations§
Source§impl FluxResource
impl FluxResource
Sourcepub const ALL: [Self; 3]
pub const ALL: [Self; 3]
The closed set of Flux resource variants this substrate binds. Enumerable so a sweep-test (or a future coherence check) can walk every variant without a hand-maintained list on the caller side.
Sourcepub const fn api_version(self) -> &'static str
pub const fn api_version(self) -> &'static str
K8s wire-form apiVersion string for this Flux resource
variant. Matches the canonical group+version pair the Flux
controllers expose today:
Kustomization→kustomize.toolkit.fluxcd.io/v1HelmRelease→helm.toolkit.fluxcd.io/v2OCIRepository→source.toolkit.fluxcd.io/v1beta2
A future Flux upgrade that bumps any group’s version lands at
ONE arm here; every downstream emit or fetch site inherits the
upgrade mechanically through the same .api_version() call.
Sourcepub const fn kind(self) -> &'static str
pub const fn kind(self) -> &'static str
K8s wire-form kind string for this Flux resource variant —
the PascalCase identifier the K8s API server matches against
the resource’s kind: slot.
A regression that misspelled any of the three PascalCase
identifiers would silently mis-route SSA-fetch against SSA-
apply (a HelmRelese emit against a HelmRelease fetch is
a 404 at wire time); post-lift a rename lands at ONE arm
here rather than at every emit or fetch site.
Sourcepub const fn wire_identity(self) -> K8sWireIdentity
pub const fn wire_identity(self) -> K8sWireIdentity
Project this variant onto the typed
crate::k8s_wire_identity::K8sWireIdentity pair — the
substrate primitive that owns the workspace-wide
(apiVersion, kind) pairing every emit or fetch site
composes against. Pre-lift the reconciler’s three
render_flux / render_aplicacao emit sites hand-authored
the pair as two adjacent json! slots ("apiVersion": FluxResource::X.api_version(), "kind": FluxResource::X.kind())
mentioning the same variant twice; post-lift the emit site
names the variant ONCE via
.wire_identity().resource_json(json!({...})) and the pair
binds structurally at the closed-set owner.
const fn so a caller can bind the pair into a const slot
— a future coherence sweep or a compile-time cache reads the
same pair with zero runtime overhead.
Trait Implementations§
Source§impl Clone for FluxResource
impl Clone for FluxResource
Source§fn clone(&self) -> FluxResource
fn clone(&self) -> FluxResource
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 FluxResource
Source§impl Debug for FluxResource
impl Debug for FluxResource
impl Eq for FluxResource
Source§impl Hash for FluxResource
impl Hash for FluxResource
Source§impl PartialEq for FluxResource
impl PartialEq for FluxResource
impl StructuralPartialEq for FluxResource
Auto Trait Implementations§
impl Freeze for FluxResource
impl RefUnwindSafe for FluxResource
impl Send for FluxResource
impl Sync for FluxResource
impl Unpin for FluxResource
impl UnsafeUnpin for FluxResource
impl UnwindSafe for FluxResource
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
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,
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.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);