pub struct PaperSpec {
pub name: Cow<'static, str>,
pub size: PaperSize,
}Expand description
A named PaperSize.
Fields§
§name: Cow<'static, str>The paper’s name, such as A4 or Letter.
size: PaperSizeThe paper’s size.
Implementations§
Trait Implementations§
Source§impl FromStr for PaperSpec
impl FromStr for PaperSpec
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parses a paper specification as name,<size>, where <size> is one of
the formats supported by PaperSize::from_str.
The canonical form of a paper specification is name,width,height,unit.
Source§type Err = ParsePaperSpecError
type Err = ParsePaperSpecError
The associated error which can be returned from parsing.
impl StructuralPartialEq for PaperSpec
Auto Trait Implementations§
impl Freeze for PaperSpec
impl RefUnwindSafe for PaperSpec
impl Send for PaperSpec
impl Sync for PaperSpec
impl Unpin for PaperSpec
impl UnwindSafe for PaperSpec
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