#[repr(u8)]pub enum PaperSize {
A5 = 0,
A4 = 1,
A3 = 2,
B5 = 3,
B4 = 4,
JisB5 = 5,
JisB4 = 6,
Letter = 7,
Legal = 8,
Ledger = 9,
}
Expand description
Page size names.
https://drafts.csswg.org/css-page-3/#typedef-page-size-page-size
Variants§
A5 = 0
ISO A5 media
A4 = 1
ISO A4 media
A3 = 2
ISO A3 media
B5 = 3
ISO B5 media
B4 = 4
ISO B4 media
JisB5 = 5
JIS B5 media
JisB4 = 6
JIS B4 media
Letter = 7
North American Letter size
Legal = 8
North American Legal size
Ledger = 9
North American Ledger size
Implementations§
source§impl PaperSize
impl PaperSize
sourcepub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>>
pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>>
Parse this keyword.
sourcepub fn from_ident(ident: &str) -> Result<Self, ()>
pub fn from_ident(ident: &str) -> Result<Self, ()>
Parse this keyword from a string slice.
source§impl PaperSize
impl PaperSize
sourcepub fn long_edge(&self) -> NonNegative<AbsoluteLength>
pub fn long_edge(&self) -> NonNegative<AbsoluteLength>
Gets the long edge length of the paper size
sourcepub fn short_edge(&self) -> NonNegative<AbsoluteLength>
pub fn short_edge(&self) -> NonNegative<AbsoluteLength>
Gets the short edge length of the paper size
Trait Implementations§
source§impl MallocSizeOf for PaperSize
impl MallocSizeOf for PaperSize
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl Parse for PaperSize
impl Parse for PaperSize
source§fn parse<'i, 't>(
_: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
fn parse<'i, 't>( _: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Parse a value of this type. Read more
source§impl SpecifiedValueInfo for PaperSize
impl SpecifiedValueInfo for PaperSize
source§const SUPPORTED_TYPES: u8 = 0u8
const SUPPORTED_TYPES: u8 = 0u8
Supported CssTypes by the given value type. Read more
impl Copy for PaperSize
impl Eq for PaperSize
impl StructuralPartialEq for PaperSize
Auto Trait Implementations§
impl Freeze for PaperSize
impl RefUnwindSafe for PaperSize
impl Send for PaperSize
impl Sync for PaperSize
impl Unpin 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert