pub struct PageStyle {
pub width: Option<HwpUnit>,
pub height: Option<HwpUnit>,
pub margin_top: Option<HwpUnit>,
pub margin_bottom: Option<HwpUnit>,
pub margin_left: Option<HwpUnit>,
pub margin_right: Option<HwpUnit>,
pub header_margin: Option<HwpUnit>,
pub footer_margin: Option<HwpUnit>,
}Expand description
Page dimensions and margins with optional fields (for YAML).
After parsing, use PageStyle::to_page_settings() to convert to
a fully-resolved PageSettings with defaults.
Fields§
§width: Option<HwpUnit>Page width.
height: Option<HwpUnit>Page height.
margin_top: Option<HwpUnit>Top margin.
margin_bottom: Option<HwpUnit>Bottom margin.
margin_left: Option<HwpUnit>Left margin.
margin_right: Option<HwpUnit>Right margin.
header_margin: Option<HwpUnit>Header margin.
Footer margin.
Implementations§
Source§impl PageStyle
impl PageStyle
Sourcepub fn to_page_settings(&self) -> PageSettings
pub fn to_page_settings(&self) -> PageSettings
Converts to PageSettings, using A4 defaults for None fields.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PageStyle
impl<'de> Deserialize<'de> for PageStyle
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 JsonSchema for PageStyle
impl JsonSchema for PageStyle
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 moreimpl StructuralPartialEq for PageStyle
Auto Trait Implementations§
impl Freeze for PageStyle
impl RefUnwindSafe for PageStyle
impl Send for PageStyle
impl Sync for PageStyle
impl Unpin for PageStyle
impl UnwindSafe for PageStyle
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