pub enum Divergence {
StatusCodeDiff {
op: String,
method: HttpMethod,
engenho: u16,
k3s: u16,
},
MissingResource {
path: JsonPath,
present_on: Side,
},
FieldDiff {
path: JsonPath,
engenho: Value,
k3s: Value,
severity: Severity,
},
MissingDefault {
path: JsonPath,
k3s_value: Value,
severity: Severity,
},
ExtraField {
path: JsonPath,
side: Side,
value: Value,
severity: Severity,
},
MissingVerb {
gvr: Gvr,
verb: Verb,
present_on: Side,
},
MissingSubresource {
gvr: Gvr,
sub: String,
present_on: Side,
},
ValidationShapeDiff {
engenho: StatusCause,
k3s: StatusCause,
},
DiscoveryDiff {
group: String,
version: String,
detail: String,
},
WatchEventDiff {
index: usize,
detail: String,
},
}Expand description
One typed way engenho’s surface diverges from k3s. Each arm is
attributed to an owning engenho crate via Divergence::owning_crate.
Variants§
StatusCodeDiff
Same operation, different HTTP status code.
MissingResource
A resource present on one side and absent (404) on the other.
FieldDiff
A field present on both but with different values.
MissingDefault
A field k3s populates by default that engenho leaves unset.
ExtraField
A field engenho adds that k3s does not carry.
MissingVerb
A verb one side supports on a resource and the other refuses.
MissingSubresource
A subresource (/status, /scale, /log) one side exposes.
ValidationShapeDiff
The two sides reject an invalid object with different cause shapes.
DiscoveryDiff
The discovery surface (/api/v1, /apis/...) differs.
WatchEventDiff
A watch stream emitted a differing event at index.
Implementations§
Source§impl Divergence
impl Divergence
Sourcepub fn severity(&self) -> Severity
pub fn severity(&self) -> Severity
The severity of this divergence (arms without an explicit severity slot are always hard).
Sourcepub fn owning_crate(&self) -> &'static str
pub fn owning_crate(&self) -> &'static str
The engenho crate that owns the fix for this divergence — the D-matrix attribution. Lets the report route each gap to its owner mechanically instead of by prose.
Sourcepub fn reroot(self, focus: &JsonPath) -> Self
pub fn reroot(self, focus: &JsonPath) -> Self
Re-root a path-carrying divergence under focus — used by the
differ’s FOCUS mode so a divergence found within a focused subtree
reports (and ratchets) at its TRUE location (focus + inner-path),
not at the subtree-local .. Arms without a JsonPath are returned
unchanged.
Sourcepub fn signature(&self) -> String
pub fn signature(&self) -> String
A stable signature — the divergence’s location + kind,
independent of the concrete values or severity. This is the ratchet
key: a baseline records signatures, and the test fails only when a
signature NOT in the baseline appears. Built via write! (the
sanctioned emission macro), never format!() of free text.
Trait Implementations§
Source§impl Clone for Divergence
impl Clone for Divergence
Source§impl Debug for Divergence
impl Debug for Divergence
Source§impl Display for Divergence
impl Display for Divergence
Source§impl PartialEq for Divergence
impl PartialEq for Divergence
impl StructuralPartialEq for Divergence
Auto Trait Implementations§
impl Forget for Divergence
impl Freeze for Divergence
impl Move for Divergence
impl RefUnwindSafe for Divergence
impl Send for Divergence
impl Sync for Divergence
impl Unpin for Divergence
impl UnsafeUnpin for Divergence
impl UnwindSafe for Divergence
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<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> ⓘ
impl<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);