Struct cssparser_color::ColorFunction
source · pub struct ColorFunction {
pub color_space: PredefinedColorSpace,
pub c1: Option<f32>,
pub c2: Option<f32>,
pub c3: Option<f32>,
pub alpha: Option<f32>,
}
Expand description
A color specified by the color() function. https://drafts.csswg.org/css-color-4/#color-function
Fields§
§color_space: PredefinedColorSpace
The color space for this color.
c1: Option<f32>
The first component of the color. Either red or x.
c2: Option<f32>
The second component of the color. Either green or y.
c3: Option<f32>
The third component of the color. Either blue or z.
alpha: Option<f32>
The alpha component of the color.
Implementations§
Trait Implementations§
source§impl Clone for ColorFunction
impl Clone for ColorFunction
source§fn clone(&self) -> ColorFunction
fn clone(&self) -> ColorFunction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ColorFunction
impl Debug for ColorFunction
source§impl PartialEq<ColorFunction> for ColorFunction
impl PartialEq<ColorFunction> for ColorFunction
source§fn eq(&self, other: &ColorFunction) -> bool
fn eq(&self, other: &ColorFunction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToCss for ColorFunction
impl ToCss for ColorFunction
impl Copy for ColorFunction
impl StructuralPartialEq for ColorFunction
Auto Trait Implementations§
impl RefUnwindSafe for ColorFunction
impl Send for ColorFunction
impl Sync for ColorFunction
impl Unpin for ColorFunction
impl UnwindSafe for ColorFunction
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more