pub struct FieldChangeEvent {
pub field_name: TextContentField,
pub from_date: Date,
pub to_date: Date,
pub old_value: String,
pub new_value: String,
pub changes: Vec<TextChange>,
}Expand description
A change detected in a single text content field between two document versions
This struct captures the complete details of a change to one of the five text content fields (Heading, Chapeau, Proviso, Content, or Continuation) in a legislative element.
The changes are computed at word-level granularity using a diff algorithm, allowing precise identification of which words were inserted, deleted, or remained unchanged.
Fields§
§field_name: TextContentFieldWhich text content field changed
from_date: DateThe publication date of the original version
to_date: DateThe publication date of the new version
old_value: StringThe complete original text of the field
new_value: StringThe complete new text of the field
changes: Vec<TextChange>Word-level changes showing insertions, deletions, and unchanged portions
Trait Implementations§
Source§impl Clone for FieldChangeEvent
impl Clone for FieldChangeEvent
Source§fn clone(&self) -> FieldChangeEvent
fn clone(&self) -> FieldChangeEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FieldChangeEvent
impl Debug for FieldChangeEvent
Source§impl<'de> Deserialize<'de> for FieldChangeEvent
impl<'de> Deserialize<'de> for FieldChangeEvent
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
Source§impl Hash for FieldChangeEvent
impl Hash for FieldChangeEvent
Source§impl PartialEq for FieldChangeEvent
impl PartialEq for FieldChangeEvent
Source§fn eq(&self, other: &FieldChangeEvent) -> bool
fn eq(&self, other: &FieldChangeEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FieldChangeEvent
impl Serialize for FieldChangeEvent
impl Eq for FieldChangeEvent
impl StructuralPartialEq for FieldChangeEvent
Auto Trait Implementations§
impl Freeze for FieldChangeEvent
impl RefUnwindSafe for FieldChangeEvent
impl Send for FieldChangeEvent
impl Sync for FieldChangeEvent
impl Unpin for FieldChangeEvent
impl UnsafeUnpin for FieldChangeEvent
impl UnwindSafe for FieldChangeEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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