pub enum GradientStop {
Color(ColorStop),
ColorHint(Length),
}
Expand description
A stop in a gradient.
Variants§
Trait Implementations§
source§impl Clone for GradientStop
impl Clone for GradientStop
source§fn clone(&self) -> GradientStop
fn clone(&self) -> GradientStop
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 GradientStop
impl Debug for GradientStop
source§impl<'de> Deserialize<'de> for GradientStop
impl<'de> Deserialize<'de> for GradientStop
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<ColorStop> for GradientStop
impl From<ColorStop> for GradientStop
source§impl From<Factor> for GradientStop
impl From<Factor> for GradientStop
source§fn from(color_hint: Factor) -> Self
fn from(color_hint: Factor) -> Self
Conversion to Length::Factor
color hint.
source§impl From<FactorPercent> for GradientStop
impl From<FactorPercent> for GradientStop
source§fn from(color_hint: FactorPercent) -> Self
fn from(color_hint: FactorPercent) -> Self
Conversion to Length::Factor
color hint.
source§impl From<Hsla> for GradientStop
impl From<Hsla> for GradientStop
source§impl From<Hsva> for GradientStop
impl From<Hsva> for GradientStop
source§impl From<Length> for GradientStop
impl From<Length> for GradientStop
source§impl From<Rgba> for GradientStop
impl From<Rgba> for GradientStop
source§impl From<f32> for GradientStop
impl From<f32> for GradientStop
source§fn from(color_hint: f32) -> Self
fn from(color_hint: f32) -> Self
Conversion to Length::Dip
color hint.
source§impl From<i32> for GradientStop
impl From<i32> for GradientStop
source§fn from(color_hint: i32) -> Self
fn from(color_hint: i32) -> Self
Conversion to Length::Dip
color hint.
source§impl IntoVar<GradientStop> for ColorStop
impl IntoVar<GradientStop> for ColorStop
source§impl IntoVar<GradientStop> for Factor
impl IntoVar<GradientStop> for Factor
source§fn into_var(self) -> Self::Var
fn into_var(self) -> Self::Var
Conversion to Length::Factor
color hint.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
Converts into
BoxedVar<T>
. Read moresource§impl IntoVar<GradientStop> for FactorPercent
impl IntoVar<GradientStop> for FactorPercent
source§fn into_var(self) -> Self::Var
fn into_var(self) -> Self::Var
Conversion to Length::Factor
color hint.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
Converts into
BoxedVar<T>
. Read moresource§impl IntoVar<GradientStop> for Hsla
impl IntoVar<GradientStop> for Hsla
source§impl IntoVar<GradientStop> for Hsva
impl IntoVar<GradientStop> for Hsva
source§impl IntoVar<GradientStop> for Length
impl IntoVar<GradientStop> for Length
source§impl IntoVar<GradientStop> for Rgba
impl IntoVar<GradientStop> for Rgba
source§impl IntoVar<GradientStop> for f32
impl IntoVar<GradientStop> for f32
source§fn into_var(self) -> Self::Var
fn into_var(self) -> Self::Var
Conversion to Length::Dip
color hint.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
Converts into
BoxedVar<T>
. Read moresource§impl IntoVar<GradientStop> for i32
impl IntoVar<GradientStop> for i32
source§fn into_var(self) -> Self::Var
fn into_var(self) -> Self::Var
Conversion to Length::Dip
color hint.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
Converts into
BoxedVar<T>
. Read moresource§impl PartialEq for GradientStop
impl PartialEq for GradientStop
source§impl Serialize for GradientStop
impl Serialize for GradientStop
impl<C: Into<Rgba>, O: Into<Length>> IntoValue<GradientStop> for (C, O)
impl IntoValue<GradientStop> for ColorStop
impl IntoValue<GradientStop> for Factor
impl IntoValue<GradientStop> for FactorPercent
impl IntoValue<GradientStop> for Hsla
impl IntoValue<GradientStop> for Hsva
impl IntoValue<GradientStop> for Length
impl IntoValue<GradientStop> for Rgba
impl IntoValue<GradientStop> for f32
impl IntoValue<GradientStop> for i32
impl StructuralPartialEq for GradientStop
Auto Trait Implementations§
impl Freeze for GradientStop
impl RefUnwindSafe for GradientStop
impl Send for GradientStop
impl Sync for GradientStop
impl Unpin for GradientStop
impl UnwindSafe for GradientStop
Blanket Implementations§
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Access to mut
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
Clone the value.
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
Clone the value into a new boxed
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
Gets if
self
equals other
.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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more