pub struct RadialColorStop {
pub color: ColorU,
pub offset1: OptionAngleValue,
pub offset2: OptionAngleValue,
}Expand description
Transient struct for parsing radial/conic color stops before normalization.
Per W3C CSS Images Level 3, a color stop can have 0, 1, or 2 positions:
red(no position)red 90deg(one position)red 45deg 90deg(two positions - creates two stops at same color)
Fields§
§color: ColorU§offset1: OptionAngleValueFirst position (optional)
offset2: OptionAngleValueSecond position (optional, only valid if offset1 is Some) When present, creates two color stops at the same color.
Trait Implementations§
Source§impl Clone for RadialColorStop
impl Clone for RadialColorStop
Source§fn clone(&self) -> RadialColorStop
fn clone(&self) -> RadialColorStop
Returns a duplicate 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 RadialColorStop
impl Debug for RadialColorStop
Source§impl Hash for RadialColorStop
impl Hash for RadialColorStop
Source§impl Ord for RadialColorStop
impl Ord for RadialColorStop
Source§fn cmp(&self, other: &RadialColorStop) -> Ordering
fn cmp(&self, other: &RadialColorStop) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RadialColorStop
impl PartialEq for RadialColorStop
Source§impl PartialOrd for RadialColorStop
impl PartialOrd for RadialColorStop
impl Copy for RadialColorStop
impl Eq for RadialColorStop
impl StructuralPartialEq for RadialColorStop
Auto Trait Implementations§
impl Freeze for RadialColorStop
impl RefUnwindSafe for RadialColorStop
impl Send for RadialColorStop
impl Sync for RadialColorStop
impl Unpin for RadialColorStop
impl UnwindSafe for RadialColorStop
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