#[non_exhaustive]pub enum Warning {
Show 21 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,
},
GlyphMissing {
font: Option<Name>,
block: UnicodeBlock,
count: u32,
},
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
PartSkipped
A part that the layout does without: its name in the package, and 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.
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.
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.
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
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
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: SubstituteLayoutHow 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
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
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: ShapeFailureWhy 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.
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: OutlineErrorWhy the caller could not measure it.
GlyphMissing
Characters that rendered as .notdef because neither the chosen font nor character
fallback had a glyph for them: the font family (when known), the coarse Unicode block, and
how many characters rendered as .notdef. Never holds raw document text.
Fields
font: Option<Name>The family of the font that drew .notdef, None when the caller does not know it
(crate::Fonts::family_name).
block: UnicodeBlockThe coarse Unicode script or block of the missing characters.
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
place: ValuePlaceWhere the value lies in the element.
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
place: ValuePlaceWhere the value lies in the element.
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.
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
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).
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.
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.
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.
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.
Implementations§
Trait Implementations§
impl Eq for Warning
impl StructuralPartialEq for Warning
Auto Trait Implementations§
impl Forget for Warning
impl Freeze for Warning
impl Move for Warning
impl RefUnwindSafe for Warning
impl Send for Warning
impl Sync for Warningwhere
RawVecInner: Sync,
impl Unpin for Warning
impl UnsafeUnpin for Warningwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static str: UnsafeUnpin,
PhantomData<Name>: UnsafeUnpin,
impl UnwindSafe for Warning
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.