Struct style::values::generics::image::Gradient [] [src]

pub struct Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle> {
    pub kind: GradientKind<LineDirection, Length, LengthOrPercentage, Position, Angle>,
    pub items: Vec<GradientItem<Color, LengthOrPercentage>>,
    pub repeating: bool,
    pub compat_mode: CompatMode,
}

A CSS gradient. https://drafts.csswg.org/css-images/#gradients

Fields

Gradients can be linear or radial.

The color stops and interpolation hints.

True if this is a repeating gradient.

Compatibility mode.

Trait Implementations

impl<LineDirection: Clone, Length: Clone, LengthOrPercentage: Clone, Position: Clone, Color: Clone, Angle: Clone> Clone for Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<LineDirection: Debug, Length: Debug, LengthOrPercentage: Debug, Position: Debug, Color: Debug, Angle: Debug> Debug for Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle>
[src]

[src]

Formats the value using the given formatter. Read more

impl<LineDirection, Length, LengthOrPercentage, Position, Color, Angle> MallocSizeOf for Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle> where
    LineDirection: MallocSizeOf,
    Length: MallocSizeOf,
    LengthOrPercentage: MallocSizeOf,
    Position: MallocSizeOf,
    Color: MallocSizeOf,
    Angle: MallocSizeOf
[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<LineDirection: PartialEq, Length: PartialEq, LengthOrPercentage: PartialEq, Position: PartialEq, Color: PartialEq, Angle: PartialEq> PartialEq for Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, 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<LineDirection, Length, LengthOrPercentage, Position, Color, Angle> ToComputedValue for Gradient<LineDirection, Length, LengthOrPercentage, Position, Color, Angle> where
    GradientKind<LineDirection, Length, LengthOrPercentage, Position, Angle>: ToComputedValue<ComputedValue = GradientKind<<LineDirection as ToComputedValue>::ComputedValue, <Length as ToComputedValue>::ComputedValue, <LengthOrPercentage as ToComputedValue>::ComputedValue, <Position as ToComputedValue>::ComputedValue, <Angle as ToComputedValue>::ComputedValue>>,
    LengthOrPercentage: ToComputedValue,
    LineDirection: ToComputedValue,
    Angle: ToComputedValue,
    Position: ToComputedValue,
    Length: ToComputedValue,
    Vec<GradientItem<Color, LengthOrPercentage>>: ToComputedValue<ComputedValue = Vec<GradientItem<<Color as ToComputedValue>::ComputedValue, <LengthOrPercentage as ToComputedValue>::ComputedValue>>>,
    Color: ToComputedValue
[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<D, L, LoP, P, C, A> ToCss for Gradient<D, L, LoP, P, C, A> where
    D: LineDirection,
    L: ToCss,
    LoP: ToCss,
    P: ToCss,
    C: ToCss,
    A: ToCss
[src]

[src]

Serialize self in CSS syntax, writing to dest.

[src]

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