Enum style::values::computed::NumberOrPercentage
[−]
[src]
pub enum NumberOrPercentage {
Percentage(Percentage),
Number(Number),
}Variants
Percentage(Percentage)Number(Number)
Trait Implementations
impl Clone for NumberOrPercentage[src]
fn clone(&self) -> NumberOrPercentage[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 ComputeSquaredDistance for NumberOrPercentage[src]
fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()>[src]
Computes the squared distance between two animatable values.
impl Copy for NumberOrPercentage[src]
impl Debug for NumberOrPercentage[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl MallocSizeOf for NumberOrPercentage[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
impl PartialEq for NumberOrPercentage[src]
fn eq(&self, __arg_0: &NumberOrPercentage) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &NumberOrPercentage) -> bool[src]
This method tests for !=.
impl ToCss for NumberOrPercentage[src]
fn to_css<W>(&self, dest: &mut W) -> Result where
W: Write, [src]
W: Write,
Serialize self in CSS syntax, writing to dest.
fn to_css_string(&self) -> String[src]
Serialize self in CSS syntax and return a string. Read more
impl From<NonNegativeLengthOrPercentage> for NumberOrPercentage[src]
fn from(lop: NonNegativeLengthOrPercentage) -> NumberOrPercentage[src]
Performs the conversion.
impl From<NonNegativeNumber> for NumberOrPercentage[src]
fn from(num: NonNegativeNumber) -> NumberOrPercentage[src]
Performs the conversion.
impl From<LengthOrPercentage> for NumberOrPercentage[src]
fn from(lop: LengthOrPercentage) -> NumberOrPercentage[src]
Performs the conversion.
impl From<Number> for NumberOrPercentage[src]
fn from(num: Number) -> NumberOrPercentage[src]
Performs the conversion.