pub struct PrintResult<C: Cost> { /* private fields */ }Expand description
The resolved optimal layout for a successful print attempt.
A PrintResult is returned from Doc::validate and
Doc::validate_with_cost when the printer is able to successfully produce
a layout for a document.
PrintResult implements Display, so the chosen layout
can be rendered through any means that allows.
Implementations§
Source§impl<C: Cost> PrintResult<C>
impl<C: Cost> PrintResult<C>
Sourcepub fn is_tainted(&self) -> bool
pub fn is_tainted(&self) -> bool
Indicates if the layout chosen was tainted.
A tainted layout is one that exceeds the computation width limit imposed by the cost factory. Such a layout
won’t be chosen unless there are no valid untainted layouts available.
If a tainted layout is chosen, it is not guaranteed to be optimal
according to the cost factory.
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for PrintResult<C>where
C: Freeze,
impl<C> !RefUnwindSafe for PrintResult<C>
impl<C> !Send for PrintResult<C>
impl<C> !Sync for PrintResult<C>
impl<C> Unpin for PrintResult<C>where
C: Unpin,
impl<C> !UnwindSafe for PrintResult<C>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more