Enum zng::color::gradient::GradientStop
source · 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<GradientStop, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GradientStop, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<C, O> From<(C, O)> for GradientStop
impl<C, O> From<(C, O)> for GradientStop
source§fn from(color_offset: (C, O)) -> GradientStop
fn from(color_offset: (C, O)) -> GradientStop
Converts to this type from the input type.
source§impl From<ColorStop> for GradientStop
impl From<ColorStop> for GradientStop
source§fn from(color_stop: ColorStop) -> GradientStop
fn from(color_stop: ColorStop) -> GradientStop
Converts to this type from the input type.
source§impl From<Factor> for GradientStop
impl From<Factor> for GradientStop
source§fn from(color_hint: Factor) -> GradientStop
fn from(color_hint: Factor) -> GradientStop
Conversion to Length::Factor
color hint.
source§impl From<FactorPercent> for GradientStop
impl From<FactorPercent> for GradientStop
source§fn from(color_hint: FactorPercent) -> GradientStop
fn from(color_hint: FactorPercent) -> GradientStop
Conversion to Length::Factor
color hint.
source§impl From<Hsla> for GradientStop
impl From<Hsla> for GradientStop
source§fn from(positional_color: Hsla) -> GradientStop
fn from(positional_color: Hsla) -> GradientStop
Conversion to positional color.
source§impl From<Hsva> for GradientStop
impl From<Hsva> for GradientStop
source§fn from(positional_color: Hsva) -> GradientStop
fn from(positional_color: Hsva) -> GradientStop
Conversion to positional color.
source§impl From<Length> for GradientStop
impl From<Length> for GradientStop
source§fn from(color_hint: Length) -> GradientStop
fn from(color_hint: Length) -> GradientStop
Converts to this type from the input type.
source§impl From<Rgba> for GradientStop
impl From<Rgba> for GradientStop
source§fn from(positional_color: Rgba) -> GradientStop
fn from(positional_color: Rgba) -> GradientStop
Conversion to positional color.
source§impl From<f32> for GradientStop
impl From<f32> for GradientStop
source§fn from(color_hint: f32) -> GradientStop
fn from(color_hint: f32) -> GradientStop
Conversion to Length::Dip
color hint.
source§impl From<i32> for GradientStop
impl From<i32> for GradientStop
source§fn from(color_hint: i32) -> GradientStop
fn from(color_hint: i32) -> GradientStop
Conversion to Length::Dip
color hint.
source§impl<C, O> IntoVar<GradientStop> for (C, O)
impl<C, O> IntoVar<GradientStop> for (C, O)
source§fn into_var(self) -> <(C, O) as IntoVar<GradientStop>>::Var
fn into_var(self) -> <(C, O) as IntoVar<GradientStop>>::Var
Converts the source value into a var.
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 ColorStop
impl IntoVar<GradientStop> for ColorStop
source§fn into_var(self) -> <ColorStop as IntoVar<GradientStop>>::Var
fn into_var(self) -> <ColorStop as IntoVar<GradientStop>>::Var
Converts the source value into a var.
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 Factor
impl IntoVar<GradientStop> for Factor
source§fn into_var(self) -> <Factor as IntoVar<GradientStop>>::Var
fn into_var(self) -> <Factor as IntoVar<GradientStop>>::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) -> <FactorPercent as IntoVar<GradientStop>>::Var
fn into_var(self) -> <FactorPercent as IntoVar<GradientStop>>::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§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 Hsva
impl IntoVar<GradientStop> for Hsva
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 Length
impl IntoVar<GradientStop> for Length
source§fn into_var(self) -> <Length as IntoVar<GradientStop>>::Var
fn into_var(self) -> <Length as IntoVar<GradientStop>>::Var
Converts the source value into a var.
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 Rgba
impl IntoVar<GradientStop> for Rgba
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 f32
impl IntoVar<GradientStop> for f32
source§fn into_var(self) -> <f32 as IntoVar<GradientStop>>::Var
fn into_var(self) -> <f32 as IntoVar<GradientStop>>::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) -> <i32 as IntoVar<GradientStop>>::Var
fn into_var(self) -> <i32 as IntoVar<GradientStop>>::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
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<C, O> 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§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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