Struct style::values::specified::angle::Angle [] [src]

pub struct Angle { /* fields omitted */ }

A specified angle.

Computed angles are essentially same as specified ones except for calc() value serialization. Therefore we are storing a computed angle inside to hold the actual value and its unit.

Methods

impl Angle
[src]

[src]

Creates an angle with the given value in degrees.

[src]

Creates an angle with the given value in gradians.

[src]

Creates an angle with the given value in turns.

[src]

Creates an angle with the given value in radians.

[src]

Returns the amount of radians this angle represents.

[src]

Returns the amount of degrees this angle represents.

[src]

Returns 0deg.

[src]

Returns an Angle parsed from a calc() expression.

impl Angle
[src]

[src]

Parse an <angle> value given a value and an unit.

[src]

Parse an <angle> allowing unitless zero to represent a zero angle.

See the comment in AllowUnitlessZeroAngle for why.

Trait Implementations

impl Clone for Angle
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Angle
[src]

impl Debug for Angle
[src]

[src]

Formats the value using the given formatter. Read more

impl MallocSizeOf for Angle
[src]

[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 Angle
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl ToCss for Angle
[src]

[src]

Serialize self in CSS syntax, writing to dest.

[src]

Serialize self in CSS syntax and return a string. Read more

impl ToComputedValue for Angle
[src]

The computed value type we're going to be converted to.

[src]

Convert a specified value to a computed value, using itself and the data inside the Context. Read more

[src]

Convert a computed value to specified value form. Read more

impl AsRef<ComputedAngle> for Angle
[src]

[src]

Performs the conversion.

impl Parse for Angle
[src]

[src]

Parses an angle according to CSS-VALUES § 6.1.