pub enum Concession {
Refuse,
Accept,
}Expand description
What to do when the document cannot be converted faithfully.
One variant per kind of compromise the pipeline knows how to make, plus
Concession::Refuse, which is always available and is the default. The
enum is deliberately not bool: “rasterize it” and “drop it” are different
answers with different consequences, and a caller who wants one and not the
other must be able to say so.
Variants§
Refuse
Do not convert. The conversion stops and reports why.
The default at every decision point, because a caller who has not thought about a compromise has not agreed to it.
Accept
Make the compromise, and record it in Conversion::compromises.
Implementations§
Trait Implementations§
Source§impl Clone for Concession
impl Clone for Concession
impl Copy for Concession
Source§impl Debug for Concession
impl Debug for Concession
Source§impl Default for Concession
impl Default for Concession
impl Eq for Concession
Source§impl Hash for Concession
impl Hash for Concession
Source§impl Ord for Concession
impl Ord for Concession
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for Concession
impl PartialEq for Concession
Source§impl PartialOrd for Concession
impl PartialOrd for Concession
impl StructuralPartialEq for Concession
Auto Trait Implementations§
impl Freeze for Concession
impl RefUnwindSafe for Concession
impl Send for Concession
impl Sync for Concession
impl Unpin for Concession
impl UnsafeUnpin for Concession
impl UnwindSafe for Concession
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
Mutably borrows from an owned value. Read more