pub enum Patch {
Merge(Value),
Strategic(Value),
Json(Vec<JsonPatchOp>),
Apply {
field_manager: String,
force: bool,
body: Value,
},
}Expand description
A patch operation against an existing resource.
Variants§
Merge(Value)
JSON Merge Patch (RFC 7396). Content-Type:
application/merge-patch+json. The simplest variant — replace
fields named in the patch, leave others alone.
Strategic(Value)
Strategic Merge Patch — Kubernetes-specific, knows how to merge
arrays of objects (e.g. containers) by key. Content-Type:
application/strategic-merge-patch+json. Default for kubectl patch without --type.
Json(Vec<JsonPatchOp>)
JSON Patch (RFC 6902) — list of add/remove/replace ops.
Content-Type: application/json-patch+json.
Apply
Server-Side Apply — declarative reconciliation with apiserver-
side field-ownership tracking. Content-Type:
application/apply-patch+yaml. Carries the field-manager id
the caller speaks for.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Patch
impl<'de> Deserialize<'de> for Patch
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Patch
impl RefUnwindSafe for Patch
impl Send for Patch
impl Sync for Patch
impl Unpin for Patch
impl UnsafeUnpin for Patch
impl UnwindSafe for Patch
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
Mutably borrows from an owned value. Read more