pub enum Paint<I = ImageBrush, G = Gradient, C = Arc<dyn Any + Send + Sync>> {
Solid(Color),
Gradient(G),
Image(I),
Resource(ImageBrush<ResourceId>),
Custom(C),
}Variants§
Solid(Color)
Solid color brush.
Gradient(G)
Gradient brush.
Image(I)
Image brush.
Resource(ImageBrush<ResourceId>)
Custom paint (referenced by ID)
Custom(C)
Custom paint (type erased as each backend will have their own)
Implementations§
Trait Implementations§
Source§impl<'a, G, C> From<ImageBrush<&'a ImageData>> for Paint<ImageBrushRef<'a>, G, C>
impl<'a, G, C> From<ImageBrush<&'a ImageData>> for Paint<ImageBrushRef<'a>, G, C>
Source§fn from(value: ImageBrushRef<'a>) -> Self
fn from(value: ImageBrushRef<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<I, G, C> Freeze for Paint<I, G, C>
impl<I, G, C> RefUnwindSafe for Paint<I, G, C>
impl<I, G, C> Send for Paint<I, G, C>
impl<I, G, C> Sync for Paint<I, G, C>
impl<I, G, C> Unpin for Paint<I, G, C>
impl<I, G, C> UnsafeUnpin for Paint<I, G, C>
impl<I, G, C> UnwindSafe for Paint<I, G, C>
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