pub enum GradientShaderColors<'a> {
Colors(&'a [Color]),
ColorsInSpace(&'a [Color4f], Option<RCHandle<SkColorSpace>>),
}
Expand description
Type that represents either a slice of Color
, or a slice of [Color4f
] and a color space.
Whenever this type is expected, it’s either possible to directly pass a &[Color]
, or
a tuple of type (&[Color4f], &ColorSpace)
.
Variants§
Implementations§
Trait Implementations§
§impl<'a> Debug for GradientShaderColors<'a>
impl<'a> Debug for GradientShaderColors<'a>
§impl<'a> From<&'a [Color]> for GradientShaderColors<'a>
impl<'a> From<&'a [Color]> for GradientShaderColors<'a>
§fn from(colors: &'a [Color]) -> GradientShaderColors<'a>
fn from(colors: &'a [Color]) -> GradientShaderColors<'a>
Converts to this type from the input type.
§impl<'a> From<&'a [Color4f]> for GradientShaderColors<'a>
impl<'a> From<&'a [Color4f]> for GradientShaderColors<'a>
§fn from(c: &'a [Color4f]) -> GradientShaderColors<'a>
fn from(c: &'a [Color4f]) -> GradientShaderColors<'a>
Converts to this type from the input type.
§impl<'a> From<(&'a [Color4f], RCHandle<SkColorSpace>)> for GradientShaderColors<'a>
impl<'a> From<(&'a [Color4f], RCHandle<SkColorSpace>)> for GradientShaderColors<'a>
§fn from(c: (&'a [Color4f], RCHandle<SkColorSpace>)) -> GradientShaderColors<'a>
fn from(c: (&'a [Color4f], RCHandle<SkColorSpace>)) -> GradientShaderColors<'a>
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for GradientShaderColors<'a>
impl<'a> RefUnwindSafe for GradientShaderColors<'a>
impl<'a> Send for GradientShaderColors<'a>
impl<'a> Sync for GradientShaderColors<'a>
impl<'a> Unpin for GradientShaderColors<'a>
impl<'a> UnwindSafe for GradientShaderColors<'a>
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