pub struct Document {
pub page_format: PageFormat,
pub margin: Margin,
pub header: Option<Header>,
pub footer: Option<Footer>,
pub header_visible_from: usize,
pub footer_visible_from: usize,
pub watermark: Option<Watermark>,
pub children: Vec<Element>,
}Fields§
§page_format: PageFormat§margin: Margin§header: Option<Header>§header_visible_from: usize§watermark: Option<Watermark>§children: Vec<Element>Implementations§
Source§impl Document
impl Document
pub fn new(page_format: PageFormat) -> Self
pub fn margin(self, margin: Margin) -> Self
pub fn header(self, header: Header) -> Self
Sourcepub fn header_visible_from(self, page: usize) -> Self
pub fn header_visible_from(self, page: usize) -> Self
First page number (1-based) on which the header is drawn. Cover-page
convenience, see plan/02-elementcatalog-and-features.md (“Deckblatt
/ Titelseite”).
Sourcepub fn watermark(self, watermark: Watermark) -> Self
pub fn watermark(self, watermark: Watermark) -> Self
Sets a document-wide diagonal stamp (“ENTWURF”, “STORNIERT”) — an independent layer, not a normal flow element (Phase 6).
pub fn add(&mut self, element: impl Into<Element>) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Document
impl !Send for Document
impl !Sync for Document
impl !UnwindSafe for Document
impl Freeze for Document
impl Unpin for Document
impl UnsafeUnpin for Document
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