pub struct Diff {
pub changes: Vec<ObjectChange>,
}Expand description
The differences between two manifests, in the plugin’s order: changed objects, then removed ones, then added ones, each by key.
Fields§
§changes: Vec<ObjectChange>The objects that differ.
Implementations§
Source§impl Diff
impl Diff
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether nothing differs (the plugin’s --detailed-exitcode exits non-zero when this is
false).
Sourcepub fn of_kind(&self, kind: ChangeKind) -> impl Iterator<Item = &ObjectChange>
pub fn of_kind(&self, kind: ChangeKind) -> impl Iterator<Item = &ObjectChange>
The objects with the given kind.
Sourcepub fn between(
before: &Manifest,
after: &Manifest,
namespace: &str,
options: &DiffOptions,
) -> Result<Self, Error>
pub fn between( before: &Manifest, after: &Manifest, namespace: &str, options: &DiffOptions, ) -> Result<Self, Error>
Compares before with after. An object is identified by ObjectId after taking
namespace as the default; an object only in before is removed unless it has the
annotation helm.sh/resource-policy: keep (generateReport), one only in after is
added, and one in both is changed when its text differs (after the options). Hooks are
ordinary objects keyed the same way, with helm.sh/hook: test ones left out by default.
The same identity in a manifest twice keeps the first, as the plugin does.
Sourcepub fn against_release(
deployed: &Release,
rendered: &Manifest,
options: &DiffOptions,
) -> Result<Self, Error>
pub fn against_release( deployed: &Release, rendered: &Manifest, options: &DiffOptions, ) -> Result<Self, Error>
Compares what deployed holds (its manifest and its hooks, as helm get manifest and
helm get hooks print them) with a fresh render of the chart, in the release’s
namespace: the plugin’s helm diff upgrade. rendered is helm template output, which
includes the hooks.
Trait Implementations§
impl StructuralPartialEq for Diff
Auto Trait Implementations§
impl Forget for Diff
impl Freeze for Diff
impl Move for Diff
impl RefUnwindSafe for Diff
impl Send for Diff
impl Sync for Diff
impl Unpin for Diff
impl UnsafeUnpin for Diff
impl UnwindSafe for Diff
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<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 more