Struct style::values::specified::time::Time
[−]
[src]
pub struct Time { /* fields omitted */ }
A time value according to CSS-VALUES § 6.2.
Methods
impl Time
[src]
pub fn from_seconds(seconds: CSSFloat) -> Self
[src]
Returns a time value that represents seconds
seconds.
pub fn zero() -> Self
[src]
Returns 0s
.
pub fn seconds(self) -> CSSFloat
[src]
Returns the time in fractional seconds.
pub fn parse_dimension(
value: CSSFloat,
unit: &str,
was_calc: bool
) -> Result<Time, ()>
[src]
value: CSSFloat,
unit: &str,
was_calc: bool
) -> Result<Time, ()>
Parses a time according to CSS-VALUES § 6.2.
pub fn from_calc(seconds: CSSFloat) -> Self
[src]
Returns a Time
value from a CSS calc()
expression.
pub fn parse_non_negative<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>
) -> Result<Self, ParseError<'i>>
[src]
context: &ParserContext,
input: &mut Parser<'i, 't>
) -> Result<Self, ParseError<'i>>
Parses a non-negative time value.
Trait Implementations
impl Clone for Time
[src]
fn clone(&self) -> Time
[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 Time
[src]
impl Debug for Time
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl MallocSizeOf for Time
[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 Time
[src]
fn eq(&self, __arg_0: &Time) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Time) -> bool
[src]
This method tests for !=
.
impl ToComputedValue for Time
[src]
type ComputedValue = ComputedTime
The computed value type we're going to be converted to.
fn to_computed_value(&self, _context: &Context) -> Self::ComputedValue
[src]
Convert a specified value to a computed value, using itself and the data inside the Context
. Read more
fn from_computed_value(computed: &Self::ComputedValue) -> Self
[src]
Convert a computed value to specified value form. Read more
impl Parse for Time
[src]
fn parse<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>
) -> Result<Self, ParseError<'i>>
[src]
context: &ParserContext,
input: &mut Parser<'i, 't>
) -> Result<Self, ParseError<'i>>
Parse a value of this type. Read more