pub struct ColorStop {
pub color: Color,
pub position: Option<DefiniteLength>,
}Expand description
A color at a point of a gradient.
Fields§
§color: ColorColor.
position: Option<DefiniteLength>Position along the gradient line: a fraction of it (50%; a
conic gradient’s angles as fractions of a turn: 90deg is 0.25),
or a length from its start (10px), resolved against its length
(Gradient::line_length) where the box is known. None is
spread evenly between its neighbors.
Trait Implementations§
impl Copy for ColorStop
Source§impl<P: Into<DefiniteLength>> From<(Hsla, P)> for ColorStop
A stop at a fraction of the gradient line (percentage(0.2)) or a
length from its start (px(12.0)).
impl<P: Into<DefiniteLength>> From<(Hsla, P)> for ColorStop
A stop at a fraction of the gradient line (percentage(0.2)) or a
length from its start (px(12.0)).
Source§impl From<Hsla> for ColorStop
A stop at no position of its own: spread evenly between its neighbors.
impl From<Hsla> for ColorStop
A stop at no position of its own: spread evenly between its neighbors.
impl StructuralPartialEq for ColorStop
Auto Trait Implementations§
impl Forget for ColorStop
impl Freeze for ColorStop
impl Move for ColorStop
impl RefUnwindSafe for ColorStop
impl Send for ColorStop
impl Sync for ColorStop
impl Unpin for ColorStop
impl UnsafeUnpin for ColorStop
impl UnwindSafe for ColorStop
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