pub struct MasterPageRegion {
pub content: String,
pub height: Option<String>,
pub style: Option<String>,
pub alignment: RegionAlignment,
}Expand description
A header or footer region in a master page.
Fields§
§content: StringContent template with placeholders like {pageNumber}, {totalPages}.
height: Option<String>Height of the region.
style: Option<String>Style name to apply.
alignment: RegionAlignmentAlignment of content within the region.
Implementations§
Source§impl MasterPageRegion
impl MasterPageRegion
Sourcepub fn page_number() -> Self
pub fn page_number() -> Self
Create a page number footer.
Sourcepub fn page_number_of_total() -> Self
pub fn page_number_of_total() -> Self
Create a “page X of Y” footer.
Sourcepub fn with_height(self, height: impl Into<String>) -> Self
pub fn with_height(self, height: impl Into<String>) -> Self
Set the height.
Sourcepub fn with_style(self, style: impl Into<String>) -> Self
pub fn with_style(self, style: impl Into<String>) -> Self
Set the style.
Sourcepub fn with_alignment(self, alignment: RegionAlignment) -> Self
pub fn with_alignment(self, alignment: RegionAlignment) -> Self
Set the alignment.
Trait Implementations§
Source§impl Clone for MasterPageRegion
impl Clone for MasterPageRegion
Source§fn clone(&self) -> MasterPageRegion
fn clone(&self) -> MasterPageRegion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MasterPageRegion
impl Debug for MasterPageRegion
Source§impl<'de> Deserialize<'de> for MasterPageRegion
impl<'de> Deserialize<'de> for MasterPageRegion
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MasterPageRegion
impl PartialEq for MasterPageRegion
Source§impl Serialize for MasterPageRegion
impl Serialize for MasterPageRegion
impl StructuralPartialEq for MasterPageRegion
Auto Trait Implementations§
impl Freeze for MasterPageRegion
impl RefUnwindSafe for MasterPageRegion
impl Send for MasterPageRegion
impl Sync for MasterPageRegion
impl Unpin for MasterPageRegion
impl UnsafeUnpin for MasterPageRegion
impl UnwindSafe for MasterPageRegion
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