pub enum PaperSize {
Mm40,
Mm44,
Mm58,
Mm72,
Mm80,
Mm104,
}Variants§
Mm40
40mm paper — print width ~32mm, 256 dots @ 203 DPI
Mm44
44mm paper — print width ~36mm, 288 dots @ 203 DPI
Mm58
58mm paper — print width ~48mm, 384 dots @ 203 DPI (most common small format)
Mm72
72mm paper — print width ~64mm, 512 dots @ 203 DPI
Mm80
80mm paper — print width ~72mm, 576 dots @ 203 DPI (most common large format)
Mm104
104mm paper — print width ~94mm, 752 dots @ 203 DPI (wide format)
Implementations§
Source§impl PaperSize
impl PaperSize
pub fn chars_per_line(&self) -> i32
pub fn pixels_width(&self) -> i32
pub fn from_string(size: &str) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PaperSize
impl<'de> Deserialize<'de> for PaperSize
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
Auto Trait Implementations§
impl Freeze for PaperSize
impl RefUnwindSafe for PaperSize
impl Send for PaperSize
impl Sync for PaperSize
impl Unpin for PaperSize
impl UnsafeUnpin for PaperSize
impl UnwindSafe for PaperSize
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<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
Source§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
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 more