pub struct BindingPatch {
pub intent: Option<Option<String>>,
pub sources: Option<Vec<Source>>,
pub reference_mems: Option<Vec<String>>,
pub destination_mem: Option<String>,
pub deny_paths: Option<Vec<String>>,
pub coverage_semantics: Option<CoverageSemantics>,
pub rules: Option<Option<Value>>,
pub prune: Option<Option<PruneConfig>>,
pub operations: Option<Operations>,
}Expand description
A partial edit of a binding record, decoded from the JSON edit entry
points (update_binding_json / add_binding_json).
Patch semantics: a field absent from the payload is preserved from
the stored record — the tail-preservation guarantee extends to every
field. A field present is applied. The natively-optional record fields
(intent, rules, prune) additionally distinguish explicit null
(clear) from absence (preserve). sources and operations are replaced
as whole blocks when present: each is the unit of its authoring, so an
entry absent from a supplied block is removed (for operations that is
legal — an absent mutating op refuses at run time with its enable
remedy).
version is engine-managed and never author input: a version key in
the payload is ignored, like every unknown key (the format grows
additively — tolerance is deliberate).
Fields§
§intent: Option<Option<String>>Set / clear (null) / preserve (absent) the binding’s intent prose.
sources: Option<Vec<Source>>Replace the inline source list when present.
reference_mems: Option<Vec<String>>Replace the read-only reference-mem list when present.
destination_mem: Option<String>Repoint the destination mem when present (null preserves — a
required record field cannot be cleared).
deny_paths: Option<Vec<String>>Replace the deny-path glob list when present.
coverage_semantics: Option<CoverageSemantics>Replace the coverage claim when present. Patch semantics are
option-as-patch: absent (None) = leave untouched. This surface
therefore cannot express clearing a declaration back to
unstated — deliberate: clearing stays out of scope, an author
edits the declaration in the binding file itself.
rules: Option<Option<Value>>Set / clear (null) / preserve (absent) the free-form rules value.
prune: Option<Option<PruneConfig>>Set / clear (null) / preserve (absent) the prune policy.
operations: Option<Operations>Replace the whole operations block when present.
Trait Implementations§
Source§impl Debug for BindingPatch
impl Debug for BindingPatch
Source§impl Default for BindingPatch
impl Default for BindingPatch
Source§fn default() -> BindingPatch
fn default() -> BindingPatch
Source§impl<'de> Deserialize<'de> for BindingPatch
impl<'de> Deserialize<'de> for BindingPatch
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>,
Auto Trait Implementations§
impl Freeze for BindingPatch
impl RefUnwindSafe for BindingPatch
impl Send for BindingPatch
impl Sync for BindingPatch
impl Unpin for BindingPatch
impl UnsafeUnpin for BindingPatch
impl UnwindSafe for BindingPatch
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
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