pub enum StopPosition {
LengthPercentage(LengthPercentage),
Number(f32),
}Expand description
Position of a ColorStop.
Variants§
LengthPercentage(LengthPercentage)
A length-percentage (50%, 100px).
Number(f32)
A unit-less number, interpreted by Lynx as a fraction
(0 = start, 1 = end).
Trait Implementations§
Source§impl Clone for StopPosition
impl Clone for StopPosition
Source§fn clone(&self) -> StopPosition
fn clone(&self) -> StopPosition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StopPosition
impl Debug for StopPosition
Source§impl From<LengthPercentage> for StopPosition
impl From<LengthPercentage> for StopPosition
Source§fn from(lp: LengthPercentage) -> Self
fn from(lp: LengthPercentage) -> Self
Converts to this type from the input type.
Source§impl From<Percentage> for StopPosition
impl From<Percentage> for StopPosition
Source§fn from(p: Percentage) -> Self
fn from(p: Percentage) -> Self
Converts to this type from the input type.
Source§impl PartialEq for StopPosition
impl PartialEq for StopPosition
Source§fn eq(&self, other: &StopPosition) -> bool
fn eq(&self, other: &StopPosition) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StopPosition
Auto Trait Implementations§
impl Freeze for StopPosition
impl RefUnwindSafe for StopPosition
impl Send for StopPosition
impl Sync for StopPosition
impl Unpin for StopPosition
impl UnsafeUnpin for StopPosition
impl UnwindSafe for StopPosition
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