Struct style::values::generics::image::ColorStop
[−]
[src]
pub struct ColorStop<Color, LengthOrPercentage> { pub color: Color, pub position: Option<LengthOrPercentage>, }
Fields
color: Color
The color of this stop.
position: Option<LengthOrPercentage>
The position of this stop.
Trait Implementations
impl<Color: Clone, LengthOrPercentage: Clone> Clone for ColorStop<Color, LengthOrPercentage>
[src]
fn clone(&self) -> ColorStop<Color, LengthOrPercentage>
[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<Color: Copy, LengthOrPercentage: Copy> Copy for ColorStop<Color, LengthOrPercentage>
[src]
impl<Color, LengthOrPercentage> MallocSizeOf for ColorStop<Color, LengthOrPercentage> where
Color: MallocSizeOf,
LengthOrPercentage: MallocSizeOf,
[src]
Color: MallocSizeOf,
LengthOrPercentage: MallocSizeOf,
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<Color: PartialEq, LengthOrPercentage: PartialEq> PartialEq for ColorStop<Color, LengthOrPercentage>
[src]
fn eq(&self, __arg_0: &ColorStop<Color, LengthOrPercentage>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ColorStop<Color, LengthOrPercentage>) -> bool
[src]
This method tests for !=
.
impl<Color, LengthOrPercentage> ToComputedValue for ColorStop<Color, LengthOrPercentage> where
Color: ToComputedValue,
Option<LengthOrPercentage>: ToComputedValue<ComputedValue = Option<<LengthOrPercentage as ToComputedValue>::ComputedValue>>,
LengthOrPercentage: ToComputedValue,
[src]
Color: ToComputedValue,
Option<LengthOrPercentage>: ToComputedValue<ComputedValue = Option<<LengthOrPercentage as ToComputedValue>::ComputedValue>>,
LengthOrPercentage: ToComputedValue,
type ComputedValue = ColorStop<<Color as ToComputedValue>::ComputedValue, <LengthOrPercentage as ToComputedValue>::ComputedValue>
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<Color, LengthOrPercentage> ToCss for ColorStop<Color, LengthOrPercentage> where
Color: ToCss,
Option<LengthOrPercentage>: ToCss,
[src]
Color: ToCss,
Option<LengthOrPercentage>: ToCss,
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<C, L> Debug for ColorStop<C, L> where
C: Debug,
L: Debug,
[src]
C: Debug,
L: Debug,