#[non_exhaustive]pub struct LayoutResult {
pub pages: Vec<PageFrame>,
pub fonts: Vec<FontData>,
pub metadata: Option<DocumentMetadata>,
pub outlines: Vec<OutlineEntry>,
pub diagnostics: Vec<Diagnostic>,
}Expand description
The complete result of laying out a document.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.pages: Vec<PageFrame>Laid-out pages.
fonts: Vec<FontData>Font data for all fonts used.
metadata: Option<DocumentMetadata>Optional document metadata for PDF output.
outlines: Vec<OutlineEntry>Outline/bookmark entries from headings.
diagnostics: Vec<Diagnostic>Rendering approximations and fallbacks collected during layout.
Implementations§
Source§impl LayoutResult
impl LayoutResult
Sourcepub fn new(
pages: Vec<PageFrame>,
fonts: Vec<FontData>,
metadata: Option<DocumentMetadata>,
outlines: Vec<OutlineEntry>,
) -> Self
pub fn new( pages: Vec<PageFrame>, fonts: Vec<FontData>, metadata: Option<DocumentMetadata>, outlines: Vec<OutlineEntry>, ) -> Self
Construct a result with no diagnostics.
use oxml_layout::LayoutResult;
let result = LayoutResult::new(Vec::new(), Vec::new(), None, Vec::new());
assert!(result.diagnostics.is_empty());Trait Implementations§
Source§impl Clone for LayoutResult
impl Clone for LayoutResult
Source§fn clone(&self) -> LayoutResult
fn clone(&self) -> LayoutResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LayoutResult
impl RefUnwindSafe for LayoutResult
impl Send for LayoutResult
impl Sync for LayoutResult
impl Unpin for LayoutResult
impl UnsafeUnpin for LayoutResult
impl UnwindSafe for LayoutResult
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