pub enum Length {
Px(f64),
Mm(f64),
Mils(f64),
Inch(f64),
}Expand description
A physical or device length.
Barcode geometry is specified in physical units — the X-dimension of a shipping label is 13 mil, not “3 pixels” — so lengths carry their unit and are converted against the output DPI.
Variants§
Px(f64)
Device pixels, used as-is regardless of DPI.
Mm(f64)
Millimetres.
Mils(f64)
Thousandths of an inch. The conventional unit for barcode X-dimensions; 13 mil is the common shipping-label default.
Inch(f64)
Inches.
Implementations§
Trait Implementations§
impl Copy for Length
impl StructuralPartialEq for Length
Auto Trait Implementations§
impl Freeze for Length
impl RefUnwindSafe for Length
impl Send for Length
impl Sync for Length
impl Unpin for Length
impl UnsafeUnpin for Length
impl UnwindSafe for Length
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