#[non_exhaustive]pub enum NamedEdit {
Replace {
at: Address,
find: String,
with: String,
},
Insert {
at: Address,
place: Place,
text: String,
style: Option<String>,
},
Delete {
at: Address,
},
Style {
at: Address,
style: String,
},
SetText {
at: Address,
text: String,
},
InsertRow {
at: Address,
place: Place,
cells: Vec<String>,
},
Comment {
at: Address,
text: String,
find: Option<String>,
author: String,
},
InsertImage {
at: Address,
place: Place,
image: ImageFile,
alt: String,
size: (Option<Length>, Option<Length>),
},
}Expand description
One named edit of an edit list.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Replace
Replaces the text find, which must occur once in the paragraph’s text, with with.
The match may cross runs, but not a tab, a break, a field code, an object or the edge of
a hyperlink, a content control, a smart tag, a simple field or custom XML. The new text
takes the formatting of the first run of the match.
Fields
Insert
Inserts a new paragraph with text before or after the paragraph or the table at.
After a paragraph it takes the paragraph’s properties without its section break, and
the style that the paragraph’s style names as the next one, as Word’s Enter does; the
text keeps the formatting of the paragraph’s first run while the style stays the same.
Before or after a table it gets no properties. style, an ID or a name of a paragraph
style, wins.
Fields
Delete
Deletes the paragraph, the table or the row at.
Style
Sets the style of the paragraph or the table at, by the style’s ID or its name.
SetText
Sets all the text of the paragraph or the cell at to text. A paragraph keeps its
properties and gets one run in the formatting of its first run. A cell keeps its
properties and gets one paragraph with the properties of its first paragraph and one
run in the formatting of that paragraph’s first run. An empty text gets no run.
Fields
InsertRow
Inserts a new row before or after the row at. It takes the row’s properties, and each
new cell the properties of its cell and one paragraph with the properties of that cell’s
first paragraph. A new cell continues a vertical merge that goes on past the new row,
and else takes part in none.
Fields
Comment
Adds a comment by author with text to the paragraph at: around its content, or
around the one match of find, which follows the rules of a replace.
Fields
text: StringThe comment’s text, in which a tab becomes a tab and no other control character may stand.
The comment’s author, not empty.
InsertImage
Inserts a new paragraph with one inline picture before or after the paragraph or the
table at, with the properties and the style that an insert gives it.
Fields
Implementations§
Trait Implementations§
impl Eq for NamedEdit
impl StructuralPartialEq for NamedEdit
Auto Trait Implementations§
impl Forget for NamedEdit
impl Freeze for NamedEditwhere
*const u8 is !null: Freeze,
PhantomData<AddressStep>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
impl Move for NamedEdit
impl RefUnwindSafe for NamedEdit
impl Send for NamedEdit
impl Sync for NamedEdit
impl Unpin for NamedEdit
impl UnsafeUnpin for NamedEditwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<AddressStep>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for NamedEdit
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.