#[non_exhaustive]pub enum EditFault {
Show 17 variants
TooManyEdits {
limit: usize,
},
Package(Error),
XmlTooLarge {
limit: usize,
},
NoSuchPart(String),
PartNotXml(Error),
PartNotUtf8(String),
UndeclaredPathPrefix(String),
NoElement {
step: usize,
},
Ambiguous {
step: usize,
count: usize,
},
ExpectNotXml(Error),
ExpectNotOneElement,
ExpectDiffers,
XmlNotValid(Error),
Overlap {
other: usize,
},
PartBroken(Error),
Write(WriteError),
Named(NamedFault),
}Expand description
What is wrong with an edit list or with one edit.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TooManyEdits
The list holds more edits than EditLimits::max_edits.
Package(Error)
The file does not open as a package.
XmlTooLarge
An xml or expect value is larger than EditLimits::max_xml_bytes.
NoSuchPart(String)
The package holds no part of this name.
PartNotXml(Error)
The part does not parse as XML.
PartNotUtf8(String)
The part is not in UTF-8, so its elements have no spans; it names this encoding.
UndeclaredPathPrefix(String)
The path uses a prefix that the part’s root element does not declare.
NoElement
A step of the path, from 1, matches no element.
Ambiguous
A step of the path, from 1, matches more than one element and has no test.
ExpectNotXml(Error)
The expect value does not parse at the element.
ExpectNotOneElement
The expect value holds no element, or more than one node besides white space.
ExpectDiffers
The element differs from the expect value.
XmlNotValid(Error)
The xml value does not parse at the element’s place, such as for a prefix that is
declared neither there nor in it (XmlError::UndeclaredPrefix).
Overlap
The element of this edit and the element of an earlier edit of the list overlap: one is the other, or holds it. The index of the other edit, from 0.
PartBroken(Error)
The part with the new XML of its edits does not parse; this edit is the first of them.
Write(WriteError)
The package writer could not write the new package.
Named(NamedFault)
A named edit does not fit the file.
Trait Implementations§
impl Eq for EditFault
Source§impl Error for EditFault
impl Error for EditFault
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl StructuralPartialEq for EditFault
Auto Trait Implementations§
impl Forget for EditFault
impl Freeze for EditFaultwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<AddressStep>: Freeze,
&'static str: Freeze,
PhantomData<String>: Freeze,
impl Move for EditFault
impl RefUnwindSafe for EditFault
impl Send for EditFault
impl Sync for EditFault
impl Unpin for EditFault
impl UnsafeUnpin for EditFaultwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<AddressStep>: UnsafeUnpin,
&'static str: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for EditFault
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.