Struct PaperSize
Source pub struct PaperSize {
pub width: f64,
pub height: f64,
pub unit: Unit,
}
Expand description
The size of a piece of paper.
The paper’s width, in unit.
The paper’s height (or length), in unit.
Constructs a new PaperSize.
Returns this paper size converted to unit.
Returns this paper size’s width and height, discarding the unit.
Returns true if self and other are equal to the nearest unit,
false otherwise.
Returns the paper’s width as a Length.
Returns the paper’s height as a Length.
Performs copy-assignment from
source.
Read more
Formats the value using the given formatter.
Read more
A4, the internationally standard paper size.
Formats the value using the given formatter.
Read more
Parses a paper size that takes one of the forms 8.5x11in or 8.5,11in
or 8.5,11,in, with optional white space.
The associated error which can be returned from parsing.
Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
Converts the given value to a
String.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.