pub enum Alignment {
Left,
Center,
Right,
}Expand description
How a line sits within the plate.
use pdfrum_doc::vt::Alignment;
// `/Q` names the three, and the default is flush left.
assert_eq!(Alignment::default(), Alignment::Left);
assert_eq!(Alignment::from_quadding(1), Alignment::Center);Variants§
Implementations§
Source§impl Alignment
impl Alignment
Sourcepub fn from_quadding(q: i64) -> Alignment
pub fn from_quadding(q: i64) -> Alignment
Reads a /Q value; anything outside 0..=2 is left-aligned.
use pdfrum_doc::vt::Alignment;
assert_eq!(Alignment::from_quadding(0), Alignment::Left);
assert_eq!(Alignment::from_quadding(2), Alignment::Right);
// Anything outside `0..=2` is left-aligned.
assert_eq!(Alignment::from_quadding(9), Alignment::Left);Trait Implementations§
impl Copy for Alignment
impl Eq for Alignment
impl StructuralPartialEq for Alignment
Auto Trait Implementations§
impl Freeze for Alignment
impl RefUnwindSafe for Alignment
impl Send for Alignment
impl Sync for Alignment
impl Unpin for Alignment
impl UnsafeUnpin for Alignment
impl UnwindSafe for Alignment
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