Skip to main content

Change

Struct Change 

Source
pub struct Change {
Show 13 fields pub id: String, pub ref: String, pub kind: ChangeKind, pub target: &'static str, pub author: Option<String>, pub date: Option<String>, pub text: String, pub paragraph: Option<String>, pub move_name: Option<String>, pub move_side: Option<MoveSide>, pub inside: Option<String>, pub holds_comments: Vec<String>, pub members: Vec<ChangeMember>,
}
Expand description

One tracked change.

Fields§

§id: String

The short id: r12 in the body, header1.r1 in another story (crate::ids::ChangeId::short).

§ref: String

The same id as Self::id.

§kind: ChangeKind

What the change does.

§target: &'static str

What it applies to: text, paragraph_mark, table_row, table_cell or properties.

§author: Option<String>

Revision author.

§date: Option<String>

The valid UTC instant, written in the author’s local offset when both times record a whole-minute difference within ±14:00; otherwise Z. Without a valid w16du:dateUtc, w:date as stored.

§text: String

The text the change covers: inserted, deleted or moved text, or the text of the run or paragraph whose properties changed.

§paragraph: Option<String>

The paragraph the change sits in (p12, header1.p2): the nearest listed paragraph around it, or a row’s, cell’s or table’s first. None in styles and outside any paragraph.

§move_name: Option<String>

The move’s name, shared by both of its sides.

§move_side: Option<MoveSide>

The side of the move, for a move.

§inside: Option<String>

The change whose content holds this one: an inserted, deleted or moved run, row or cell around it, or the mark of the paragraph whose properties it changes. Resolving that change so its content goes (accepting a deletion or the moved-from side, rejecting an insertion or the moved-to side) takes this one along.

§holds_comments: Vec<String>

The comments (c4, and a reply’s c5) whose reference mark this change holds: resolving it so its content goes (as for Self::inside) removes their threads, as Word does (#1159).

§members: Vec<ChangeMember>

The marks of a logical change (list_logical_changes) that Word wrote as several elements, in reading order: empty for one element.

Implementations§

Source§

impl Change

Source

pub fn element_ids(&self) -> impl Iterator<Item = &str>

The ids of the elements this change is made of, in reading order: its Self::members’, or its own for a change of one element.

Trait Implementations§

Source§

impl Clone for Change

Source§

fn clone(&self) -> Change

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Change

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for Change

Source§

impl PartialEq for Change

Source§

fn eq(&self, other: &Change) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Change

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Change

Auto Trait Implementations§

§

impl Forget for Change

§

impl Freeze for Change

§

impl Move for Change

§

impl RefUnwindSafe for Change

§

impl Send for Change

§

impl Sync for Change

§

impl Unpin for Change

§

impl UnsafeUnpin for Change

§

impl UnwindSafe for Change

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.