pub enum Paint {
Solid(Color),
Linear(LinearGradient),
Radial(RadialGradient),
}Expand description
A fill source: a solid color, or a linear/radial gradient (docs/shapes.md §3.2 — angular and
semantic tokens are later phases). From<Color> keeps every existing fill(shape, color)
call site compiling unchanged.
Variants§
Trait Implementations§
Source§impl From<LinearGradient> for Paint
impl From<LinearGradient> for Paint
Source§fn from(g: LinearGradient) -> Paint
fn from(g: LinearGradient) -> Paint
Converts to this type from the input type.
Source§impl From<RadialGradient> for Paint
impl From<RadialGradient> for Paint
Source§fn from(g: RadialGradient) -> Paint
fn from(g: RadialGradient) -> Paint
Converts to this type from the input type.
impl StructuralPartialEq for Paint
Auto Trait Implementations§
impl Freeze for Paint
impl RefUnwindSafe for Paint
impl Send for Paint
impl Sync for Paint
impl Unpin for Paint
impl UnsafeUnpin for Paint
impl UnwindSafe for Paint
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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§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