pub struct MasterPage {
pub apply_page_type: ApplyPageType,
pub paragraphs: Vec<Paragraph>,
}Expand description
A master page (background/watermark page) for a section.
Master pages provide background content rendered behind the main body.
Maps to <masterPage> elements inside <hp:secPr>.
In HWPX, each master page has an applyPageType attribute
(BOTH, EVEN, or ODD) and contains its own paragraphs.
Fields§
§apply_page_type: ApplyPageTypeWhich pages this master page applies to.
paragraphs: Vec<Paragraph>Paragraphs composing the master page content.
Implementations§
Source§impl MasterPage
impl MasterPage
Sourcepub fn new(apply_page_type: ApplyPageType, paragraphs: Vec<Paragraph>) -> Self
pub fn new(apply_page_type: ApplyPageType, paragraphs: Vec<Paragraph>) -> Self
Creates a new master page with the given page type and paragraphs.
Trait Implementations§
Source§impl Clone for MasterPage
impl Clone for MasterPage
Source§fn clone(&self) -> MasterPage
fn clone(&self) -> MasterPage
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 MasterPage
impl Debug for MasterPage
Source§impl<'de> Deserialize<'de> for MasterPage
impl<'de> Deserialize<'de> for MasterPage
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 Display for MasterPage
impl Display for MasterPage
Source§impl JsonSchema for MasterPage
impl JsonSchema for MasterPage
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for MasterPage
impl PartialEq for MasterPage
Source§impl Serialize for MasterPage
impl Serialize for MasterPage
impl StructuralPartialEq for MasterPage
Auto Trait Implementations§
impl Freeze for MasterPage
impl RefUnwindSafe for MasterPage
impl Send for MasterPage
impl Sync for MasterPage
impl Unpin for MasterPage
impl UnwindSafe for MasterPage
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