#[non_exhaustive]pub enum PatchOperation {
AddApplicability(Applicability),
ReplaceApplicability {
expected: Vec<Applicability>,
replacement: Vec<Applicability>,
},
AddProperty(PropertyTemplate),
ReplaceQuantityKind {
member: String,
expected: QuantityKind,
replacement: QuantityKind,
},
ReplacePropertyKind {
member: String,
expected: PropertyKind,
replacement: PropertyKind,
},
AddAdvisory {
severity: AdvisorySeverity,
message: String,
},
}Expand description
The kind of change one Patch makes to a set template.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AddApplicability(Applicability)
Add a new applicability selector, rejected if it duplicates an
existing selector or if the target already has a
ReplaceApplicability applied.
ReplaceApplicability
Replace the target’s entire applicability list, rejected unless the
current list equals expected exactly.
Fields
expected: Vec<Applicability>Applicability list the target must currently have.
replacement: Vec<Applicability>Applicability list to install in its place.
AddProperty(PropertyTemplate)
Append a property template the edition’s documentation lists but its machine-readable PSD omits. Rejected when the target is a quantity set or already has a member of that name.
ReplaceQuantityKind
Replace the kind of one quantity of a quantity set, rejected unless
the quantity currently has the expected kind. For a published kind
that real files cannot match.
Fields
expected: QuantityKindKind the quantity must currently have.
replacement: QuantityKindKind to install in its place.
ReplacePropertyKind
Replace the kind of one property of a property set, rejected unless
the property currently has the expected kind. For a published kind
that real files cannot match.
Fields
expected: PropertyKindKind the property must currently have.
replacement: PropertyKindKind to install in its place.
AddAdvisory
Attach an Advisory to the target template without changing its data.
Fields
severity: AdvisorySeverityHow serious the advisory is.
Trait Implementations§
Source§impl Clone for PatchOperation
impl Clone for PatchOperation
Source§fn clone(&self) -> PatchOperation
fn clone(&self) -> PatchOperation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more