pub enum PaperWidth {
Mm58,
Mm80,
}Expand description
Paper roll width.
use hardless_render::PaperWidth;
assert_eq!(PaperWidth::Mm80.columns(), (48, 64));
assert_eq!(serde_json::to_string(&PaperWidth::Mm58).unwrap(), "58");Variants§
Mm58
58 mm: 384 dots, 32 columns in Font A, 42 in Font B.
Mm80
80 mm: 576 dots, 48 columns in Font A, 64 in Font B (the default).
Implementations§
Trait Implementations§
Source§impl Clone for PaperWidth
impl Clone for PaperWidth
impl Copy for PaperWidth
Source§impl Debug for PaperWidth
impl Debug for PaperWidth
Source§impl Default for PaperWidth
impl Default for PaperWidth
Source§impl<'de> Deserialize<'de> for PaperWidth
impl<'de> Deserialize<'de> for PaperWidth
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
impl Eq for PaperWidth
Source§impl From<PaperWidth> for u16
impl From<PaperWidth> for u16
Source§fn from(paper: PaperWidth) -> u16
fn from(paper: PaperWidth) -> u16
Converts to this type from the input type.
Source§impl Hash for PaperWidth
impl Hash for PaperWidth
Source§impl PartialEq for PaperWidth
impl PartialEq for PaperWidth
Source§impl Serialize for PaperWidth
impl Serialize for PaperWidth
impl StructuralPartialEq for PaperWidth
Auto Trait Implementations§
impl Freeze for PaperWidth
impl RefUnwindSafe for PaperWidth
impl Send for PaperWidth
impl Sync for PaperWidth
impl Unpin for PaperWidth
impl UnsafeUnpin for PaperWidth
impl UnwindSafe for PaperWidth
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