pub enum EntityDiff {
Added {
id: EntityId,
title: Option<String>,
entity_type: Option<String>,
content_after: Option<String>,
ripple: Vec<IncomingRipple>,
},
Modified {
id: EntityId,
title: Option<String>,
entity_type: Option<String>,
content_before: Option<String>,
content_after: Option<String>,
ripple: Vec<IncomingRipple>,
},
Deleted {
id: EntityId,
title: Option<String>,
entity_type: Option<String>,
content_before: Option<String>,
ripple: Vec<IncomingRipple>,
},
Renamed {
from_id: EntityId,
to_id: EntityId,
rename_chain: Vec<EntityId>,
title: Option<String>,
entity_type: Option<String>,
content_before: Option<String>,
content_after: Option<String>,
ripple: Vec<IncomingRipple>,
},
InvalidEntity {
id: EntityId,
side: String,
error: String,
content_before: Option<String>,
content_after: Option<String>,
},
}Expand description
Per-entity diff entry. Variants mirror the change kinds an
entity-level diff can produce; InvalidEntity is the soft-failure
path for entities that fail to parse on either side (consumers
decide how to handle each case — memstead_diff does not refuse the
whole call just because one entity is malformed).
Variants§
Added
Entity exists on the ref_b side and not on ref_a. No
rename was detected — this is a fresh entity.
Fields
content_after: Option<String>Full markdown body on the ref_b side. None when the
caller passed include_content: false.
ripple: Vec<IncomingRipple>Entities on either side that link inbound to this id. Empty when ripple is disabled or no inbound links exist.
Modified
Entity exists on both sides; bodies differ.
Fields
ripple: Vec<IncomingRipple>Deleted
Entity exists on ref_a but not on ref_b — and no rename
was detected to a surviving entity.
Fields
ripple: Vec<IncomingRipple>Renamed
Entity was renamed from from_id (present on ref_a) to
to_id (present on ref_b). The two ids are reported with
the rename chain — the sequence of intermediate ids when the
rename passed through multiple commits between ref_a and
ref_b.
Fields
rename_chain: Vec<EntityId>Intermediate ids the rename passed through, oldest to
newest. Empty for a direct one-step rename. Pulled from
the Tier-D agent-notes trail so a single Renamed entry
covers the full chain rather than emitting N intermediate
pairs.
ripple: Vec<IncomingRipple>InvalidEntity
Entity failed to parse on at least one side. The caller sees the id (best-effort) and the parse-error message; the surviving side’s content can still ride along when available.
Trait Implementations§
Source§impl Clone for EntityDiff
impl Clone for EntityDiff
Source§fn clone(&self) -> EntityDiff
fn clone(&self) -> EntityDiff
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EntityDiff
impl Debug for EntityDiff
Source§impl<'de> Deserialize<'de> for EntityDiff
impl<'de> Deserialize<'de> for EntityDiff
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EntityDiff, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EntityDiff, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for EntityDiff
Source§impl PartialEq for EntityDiff
impl PartialEq for EntityDiff
Source§impl Serialize for EntityDiff
impl Serialize for EntityDiff
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for EntityDiff
Auto Trait Implementations§
impl Freeze for EntityDiff
impl RefUnwindSafe for EntityDiff
impl Send for EntityDiff
impl Sync for EntityDiff
impl Unpin for EntityDiff
impl UnsafeUnpin for EntityDiff
impl UnwindSafe for EntityDiff
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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