Skip to main content

Warning

Enum Warning 

Source
#[non_exhaustive]
pub enum Warning {
Show 20 variants PartSkipped { part: Name, reason: Reason, }, RelationshipsSkipped { part: Name, }, DrawingSkipped { drawing: Drawing, part: Name, reason: Reason, }, WrapPolygonSkipped { part: Name, reason: Reason, }, ArtBorderNotDrawn { style: &'static str, size: u32, }, FontSubstituted { asked: Name, used: Option<Name>, version: Option<Name>, layout: SubstituteLayout, }, TextNotDrawn { asked: Option<Name>, tried: Vec<Name>, }, FontNotFound { asked: Option<Name>, tried: Vec<Name>, }, ScriptNotShaped { font: Option<Name>, cause: ShapeFailure, }, FontFileNotRead { file: Name, cause: NotReadCause, }, InkNotMeasured { font: Option<Name>, cause: OutlineError, }, InvalidValue { part: Name, element: Name, place: ValuePlace, read_as: ReadAs, }, ValueNotSupported { part: Name, element: Name, place: ValuePlace, value: Name, }, NoteIdRepeated { part: Name, id: i64, }, NoteMissing { part: Name, note: NoteKind, id: i64, }, UndeclaredPrefix { part: Name, prefix: Name, }, LimitReached { part: Name, limit: Limit, }, Metafile { part: Name, warning: Warning, }, DrawingMl { part: Name, warning: Warning, }, FeatureNotSupported { part: Name, feature: Feature, },
}
Expand description

What a DOCX layout left out or drew in another way, and went on.

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.
§

PartSkipped

A part that the layout does without: its name in the package, and why.

Fields

§part: Name

The part.

§reason: Reason

Why.

§

RelationshipsSkipped

A part whose relationships do not read, so that the layout draws it without what they name, such as its pictures: the part’s name, or / for the package’s own relationships.

Fields

§part: Name

The part.

§

DrawingSkipped

A drawing that the layout leaves out: its kind, the part that holds it (or, when its relationship ID names no part, the part that names it, and for a drawing that the reader of a part leaves out, that part), and why.

Fields

§drawing: Drawing

The kind of drawing.

§part: Name

The part.

§reason: Reason

Why.

§

WrapPolygonSkipped

The polygon of a floating drawing’s tight or through wrap (wp:wrapPolygon) that the layout leaves out, so that the text keeps out of the drawing’s box, as for a wrap without a polygon: the part that holds the drawing, and why.

Fields

§part: Name

The part.

§reason: Reason

Why.

§

ArtBorderNotDrawn

A page border’s side of an art style, such as apples, that the layout leaves out because the caller gave no picture of the style at the side’s size (crate::ArtPictures): the style and the size.

Fields

§style: &'static str

The art style, as the schema spells it.

§size: u32

The side’s size, in points (w:sz).

§

FontSubstituted

A font family that the document asks for and that a face of another family draws: the family asked for, and the family and version of the face that draws it, when the caller knows them, with how its layout stands to the family’s.

Fields

§asked: Name

The family that the document asks for.

§used: Option<Name>

The family of the face that draws it, None when the caller does not know it (crate::Fonts::family_name).

§version: Option<Name>

The version of the face that draws it, such as “7.06.1”, None when the caller does not know it (crate::Fonts::face_version).

§layout: SubstituteLayout

How the layout of the face that draws it stands to the family’s.

§

TextNotDrawn

Text that the layout leaves out because the caller has no face for it: none of the family that it asks for, nor of the names that stand for that family, nor of a family that Word draws in its place.

Fields

§asked: Option<Name>

The family that the text asks for, None for text that names no font.

§tried: Vec<Name>

The families that were tried, in order, each with the faces that stand in for it.

§

FontNotFound

A font that the layout looks for, other than for text that it leaves out, when the caller has no face of it, nor of the names that stand for it, nor of a family that Word draws in its place: for a paragraph mark, a tab or a line break, which then takes no face, so that its height is not part of its line’s, or for a character that its run’s font lacks, which then does not take the family. A font whose text the layout leaves out gives Warning::TextNotDrawn only.

Fields

§asked: Option<Name>

The family looked for, None for a piece that names no font.

§tried: Vec<Name>

The families that were tried, in order, each with the faces that stand in for it.

§

ScriptNotShaped

A font whose text of a shaped script, such as Arabic, the caller could not shape, so that each of its characters has the glyph of the font’s character map.

Fields

§font: Option<Name>

The family of the font, None when the caller does not know it (crate::Fonts::family_name).

§cause: ShapeFailure

Why the caller could not shape it.

§

FontFileNotRead

A font file whose bytes did not load when the caller chose one of its faces, so that the face counted as missing: the file’s path in its font folder, and why.

Fields

§file: Name

The file’s path in its font folder.

§cause: NotReadCause

Why the file did not load.

§

InkNotMeasured

A font with a glyph whose ink the layout asked for, as for an equation, and that the caller could not measure, so that the layout places the glyph as one without ink.

Fields

§font: Option<Name>

The family of the font, None when the caller does not know it (crate::Fonts::family_name).

§cause: OutlineError

Why the caller could not measure it.

§

InvalidValue

A value that does not read as its type, such as a length written as text: the part, the element and the place in the element that hold it, and the reading that the layout took in its place.

Fields

§part: Name

The part.

§element: Name

The element that holds the value.

§place: ValuePlace

Where the value lies in the element.

§read_as: ReadAs

The reading that the layout took.

§

ValueNotSupported

A value that is a value of its type and that the layout draws as another value of the type, such as a striped shading that it draws as its fill alone: the part, the element and the place in the element that hold it, and the value, a name of the type.

Fields

§part: Name

The part.

§element: Name

The element that holds the value.

§place: ValuePlace

Where the value lies in the element.

§value: Name

The value, a name of its type.

§

NoteIdRepeated

A normal footnote or endnote whose ID has the number of an earlier normal note of its part: the part, and the number. The layout keeps one of the two, as the target’s quirk RepeatedNoteId says, and a reference of the number finds it. The warning comes once for each note that repeats a number.

Fields

§part: Name

The part.

§id: i64

The number of the ID.

§

NoteMissing

A reference to a footnote or an endnote (w:footnoteReference, w:endnoteReference) whose ID no normal note of the footnotes or the endnotes part has: the part of the reference, the kind of note, and the number of the ID. The reference’s number is drawn, and no note. The warning comes once for each such reference.

Fields

§part: Name

The part of the reference.

§note: NoteKind

Whether it refers to a footnote or an endnote.

§id: i64

The number of the ID.

§

UndeclaredPrefix

A namespace prefix that a part, or a relationships part, uses on an element or an attribute without a declaration, which XML’s namespaces forbid: the part, and the prefix. The reader goes on, once for each prefix of a part: an element of the prefix, with what it holds, is none that a reader takes, and an attribute of it reads as an attribute without a prefix (f_office_xml::Document::undeclared_prefixes).

Fields

§part: Name

The part.

§prefix: Name

The prefix.

§

LimitReached

A value of the file beyond a limit of F-Office’s work, which the reader takes as the limit before it goes on, such as a table of more grid columns than the layout takes: the part, and the limit.

Fields

§part: Name

The part.

§limit: Limit

The limit.

§

Metafile

A record of an EMF or WMF picture that the layout leaves out or draws in another way: the picture’s part, and what its player warns of.

Fields

§part: Name

The part of the picture.

§warning: Warning

What the player warns of.

§

DrawingMl

A value of DrawingML that a reader of DrawingML read in another way than the file asks, such as a line width that does not read: the part, and what the reader warns of.

Fields

§part: Name

The part.

§warning: Warning

What the reader of DrawingML warns of.

§

FeatureNotSupported

A feature of VML, WordprocessingML or OMML that F-Office does not draw, which it draws in another way or leaves out, such as the rotation of a VML shape: the part, and the feature.

Fields

§part: Name

The part.

§feature: Feature

The feature.

Implementations§

Source§

impl Warning

Source

pub fn kind(&self) -> &'static str

The warning’s kind, a short name that stays the same across versions and holds no name of the file, for a caller that counts warnings or writes them where the names of the file may not go.

Trait Implementations§

Source§

impl Clone for Warning

Source§

fn clone(&self) -> Warning

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 Warning

Source§

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

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

impl Display for Warning

Source§

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

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

impl Eq for Warning

Source§

impl Hash for Warning

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Warning

Source§

fn eq(&self, other: &Warning) -> 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 Warning

Auto Trait Implementations§

§

impl Forget for Warning

§

impl Freeze for Warning
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, &'static str: Freeze, PhantomData<Name>: Freeze,

§

impl Move for Warning

§

impl RefUnwindSafe for Warning

§

impl Send for Warning
where RawVecInner: Send, &'static str: Send,

§

impl Sync for Warning
where RawVecInner: Sync,

§

impl Unpin for Warning
where *const u8 is !null: Unpin, &'static str: Unpin,

§

impl UnsafeUnpin for Warning

§

impl UnwindSafe for Warning
where RawVecInner: UnwindSafe, &'static str: UnwindSafe,

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.