pub enum BreakValue {
Auto,
Always,
Page,
Column,
EvenPage,
OddPage,
}Expand description
Break-before and break-after property values
Controls forced page/column breaks before or after an element. Based on XSL-FO 1.1 specification.
§Examples
use fop_layout::layout::BreakValue;
let break_val = BreakValue::Page;
assert!(break_val.forces_break());
let auto = BreakValue::Auto;
assert!(!auto.forces_break());Variants§
Auto
auto - no forced break
Always
always - force break (deprecated, use page)
Page
page - force page break
Column
column - force column break
EvenPage
even-page - force break to next even-numbered page
OddPage
odd-page - force break to next odd-numbered page
Implementations§
Source§impl BreakValue
impl BreakValue
Sourcepub fn from_property_value(value: &PropertyValue) -> Self
pub fn from_property_value(value: &PropertyValue) -> Self
Create a BreakValue from a property value
Sourcepub fn forces_break(&self) -> bool
pub fn forces_break(&self) -> bool
Check if this value forces a break
Sourcepub fn forces_page_break(&self) -> bool
pub fn forces_page_break(&self) -> bool
Check if this forces a page break (not column)
Sourcepub fn requires_even_page(&self) -> bool
pub fn requires_even_page(&self) -> bool
Check if this requires an even page
Sourcepub fn requires_odd_page(&self) -> bool
pub fn requires_odd_page(&self) -> bool
Check if this requires an odd page
Trait Implementations§
Source§impl Clone for BreakValue
impl Clone for BreakValue
Source§fn clone(&self) -> BreakValue
fn clone(&self) -> BreakValue
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 BreakValue
impl Debug for BreakValue
Source§impl Default for BreakValue
impl Default for BreakValue
Source§fn default() -> BreakValue
fn default() -> BreakValue
Returns the “default value” for a type. Read more
Source§impl Display for BreakValue
impl Display for BreakValue
Source§impl PartialEq for BreakValue
impl PartialEq for BreakValue
impl Copy for BreakValue
impl Eq for BreakValue
impl StructuralPartialEq for BreakValue
Auto Trait Implementations§
impl Freeze for BreakValue
impl RefUnwindSafe for BreakValue
impl Send for BreakValue
impl Sync for BreakValue
impl Unpin for BreakValue
impl UnsafeUnpin for BreakValue
impl UnwindSafe for BreakValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().