Enum style_traits::viewport::Zoom
[−]
[src]
pub enum Zoom {
Number(f32),
Percentage(f32),
Auto,
}Variants
Number(f32)A number value.
Percentage(f32)A percentage value.
AutoThe auto keyword.
Methods
impl Zoom[src]
pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Zoom, ParseError<'i>>[src]
Parse a zoom value per:
https://drafts.csswg.org/css-device-adapt/#descdef-viewport-zoom
pub fn to_f32(&self) -> Option<f32>[src]
Get this zoom value as a float value. Returns None if the value is the
auto keyword.
Trait Implementations
impl Clone for Zoom[src]
fn clone(&self) -> Zoom[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Copy for Zoom[src]
impl Debug for Zoom[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl PartialEq for Zoom[src]
fn eq(&self, __arg_0: &Zoom) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Zoom) -> bool[src]
This method tests for !=.
impl MallocSizeOf for Zoom[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize[src]
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more