Skip to main content

NamedFault

Enum NamedFault 

Source
#[non_exhaustive]
pub enum NamedFault {
Show 29 variants MainPart(String), TrackedChanges, NoBlock(Address), OutsideBody(Address), WrongKind { at: Address, needs: &'static str, }, NoElement(Address), NoPrefix, EmptyFind, TextNotFound, TextNotFoundOutsideEquations, TextAmbiguous { count: usize, }, MatchCrossesElement { element: &'static str, }, MatchCrossesEdge { element: &'static str, }, MatchesOverlap { other: usize, }, BadCharacter(char), SectionBreak, NeedsParagraph, LastRow, RangeEnd { element: &'static str, }, NoSuchStyle { style: String, kind: &'static str, near: Vec<String>, }, NewXml(Error), WrappedCells, TooManyCells { given: usize, cells: usize, }, MergedCellText { cell: usize, }, EmptyAuthor, EmptyAlt, ImageSize, NoFreeId(&'static str), Part { part: String, why: String, },
}
Expand description

What is wrong with a named edit, or with the file for all of them. Each message names the fix.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

MainPart(String)

The package has no main document part, or it does not parse.

§

TrackedChanges

The main document part holds tracked changes, which a named edit does not make.

§

NoBlock(Address)

The file has no block or row at the address.

§

OutsideBody(Address)

The address names an element of a header, a footer, a note or a text box, which a named edit does not change.

§

WrongKind

The block at the address is of a kind that the edit does not take.

Fields

§at: Address

The address.

§needs: &'static str

What the edit needs.

§

NoElement(Address)

The block was not read from an element of the main document part: F-Office made it, or the blocks are of another file.

§

NoPrefix

The part declares no prefix for WordprocessingML, so the edit cannot name its elements.

§

EmptyFind

The text of a replace is empty.

§

TextNotFound

The paragraph’s text does not hold the text of a replace.

§

TextNotFoundOutsideEquations

The paragraph’s text outside its equations does not hold the text of a replace. The paragraph holds an equation, whose text its text block shows and a replace does not change.

§

TextAmbiguous

The paragraph’s text holds the text of a replace more than once.

Fields

§count: usize

How often it occurs.

§

MatchCrossesElement

The match of a replace crosses an element that has no text of its own, such as w:tab.

Fields

§element: &'static str

The element’s name, such as w:tab.

§

MatchCrossesEdge

The match of a replace crosses the edge of an element that holds runs, such as w:hyperlink.

Fields

§element: &'static str

The element’s name, such as w:hyperlink.

§

MatchesOverlap

Two replaces of one paragraph match overlapping text. The index of the other edit.

Fields

§other: usize

The index of the other edit, from 0.

§

BadCharacter(char)

The new text holds a character that the edit cannot write.

§

SectionBreak

The paragraph ends a section: its properties hold a w:sectPr.

§

NeedsParagraph

The delete would leave a cell or the body without a paragraph at its end, also counting the blocks that earlier deletes of the list take away.

§

LastRow

The row is the last row of its table that earlier deletes of the list leave.

§

RangeEnd

The block holds one end of a range whose other end lies outside it.

Fields

§element: &'static str

The element at the end, such as w:bookmarkStart.

§

NoSuchStyle

The styles part has no style of this ID or name and kind.

Fields

§style: String

The style that the edit gives.

§kind: &'static str

Its kind.

§near: Vec<String>

The IDs of the styles of the kind whose ID holds the given text in any case, for the message.

§

NewXml(Error)

The new XML of an edit does not parse at its place, such as for a prefix that the copied properties use and that is declared on the block itself.

§

WrappedCells

The row holds a cell inside a content control, custom XML or alternate content, which a new row does not copy.

§

TooManyCells

A new row gets more texts than its row has cells.

Fields

§given: usize

The number of texts.

§cells: usize

The number of cells.

§

MergedCellText

A new cell that continues a vertical merge gets a text, which stands in the merge’s first cell.

Fields

§cell: usize

The cell’s number, from 1.

§

EmptyAuthor

The comment has no author.

§

EmptyAlt

The image has no text that describes it.

§

ImageSize

The width or the height of the image’s drawing is not more than zero, or lies beyond the largest length of a file.

§

NoFreeId(&'static str)

The file uses the largest ID of this kind, such as comment.

§

Part

A part besides the main document part that the edit changes does not read.

Fields

§part: String

The part’s name.

§why: String

Why it does not read.

Trait Implementations§

Source§

impl Clone for NamedFault

Source§

fn clone(&self) -> NamedFault

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 NamedFault

Source§

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

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

impl Display for NamedFault

Source§

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

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

impl Eq for NamedFault

Source§

impl Error for NamedFault

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Replaced by Error::source.
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for NamedFault

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for NamedFault

Auto Trait Implementations§

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<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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> Finish for T

Source§

fn finish(self)

Does nothing but move self, equivalent to drop.
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<U, T> ToOwnedObj<U> for T
where U: FromObjRef<T>,

Source§

fn to_owned_obj(&self, data: FontData<'_>) -> U

Convert this type into T, using the provided data to resolve any offsets.
Source§

impl<U, T> ToOwnedTable<U> for T
where U: FromTableRef<T>,

Source§

fn to_owned_table(&self) -> U

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.