Enum style::values::generics::image::Image
[−]
[src]
pub enum Image<Gradient, MozImageRect, ImageUrl> { Url(ImageUrl), Gradient(Box<Gradient>), Rect(Box<MozImageRect>), Element(Atom), PaintWorklet(PaintWorklet), }
An image.
Variants
Url(ImageUrl)
A <url()>
image.
Gradient(Box<Gradient>)
A <gradient>
image. Gradients are rather large, and not nearly as
common as urls, so we box them here to keep the size of this enum sane.
Rect(Box<MozImageRect>)
A -moz-image-rect
image. Also fairly large and rare.
Element(Atom)
A -moz-element(# <element-id>)
PaintWorklet(PaintWorklet)
A paint worklet image. https://drafts.css-houdini.org/css-paint-api/
Trait Implementations
impl<Gradient: Clone, MozImageRect: Clone, ImageUrl: Clone> Clone for Image<Gradient, MozImageRect, ImageUrl>
[src]
fn clone(&self) -> Image<Gradient, MozImageRect, ImageUrl>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<Gradient, MozImageRect, ImageUrl> MallocSizeOf for Image<Gradient, MozImageRect, ImageUrl> where
Gradient: MallocSizeOf,
MozImageRect: MallocSizeOf,
ImageUrl: MallocSizeOf,
[src]
Gradient: MallocSizeOf,
MozImageRect: MallocSizeOf,
ImageUrl: MallocSizeOf,
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more
impl<Gradient: PartialEq, MozImageRect: PartialEq, ImageUrl: PartialEq> PartialEq for Image<Gradient, MozImageRect, ImageUrl>
[src]
fn eq(&self, __arg_0: &Image<Gradient, MozImageRect, ImageUrl>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Image<Gradient, MozImageRect, ImageUrl>) -> bool
[src]
This method tests for !=
.
impl<Gradient, MozImageRect, ImageUrl> ToComputedValue for Image<Gradient, MozImageRect, ImageUrl> where
ImageUrl: ToComputedValue,
Box<Gradient>: ToComputedValue<ComputedValue = Box<<Gradient as ToComputedValue>::ComputedValue>>,
Gradient: ToComputedValue,
Box<MozImageRect>: ToComputedValue<ComputedValue = Box<<MozImageRect as ToComputedValue>::ComputedValue>>,
MozImageRect: ToComputedValue,
[src]
ImageUrl: ToComputedValue,
Box<Gradient>: ToComputedValue<ComputedValue = Box<<Gradient as ToComputedValue>::ComputedValue>>,
Gradient: ToComputedValue,
Box<MozImageRect>: ToComputedValue<ComputedValue = Box<<MozImageRect as ToComputedValue>::ComputedValue>>,
MozImageRect: ToComputedValue,
type ComputedValue = Image<<Gradient as ToComputedValue>::ComputedValue, <MozImageRect as ToComputedValue>::ComputedValue, <ImageUrl as ToComputedValue>::ComputedValue>
The computed value type we're going to be converted to.
fn to_computed_value(&self, context: &Context) -> Self::ComputedValue
[src]
Convert a specified value to a computed value, using itself and the data inside the Context
. Read more
fn from_computed_value(computed: &Self::ComputedValue) -> Self
[src]
Convert a computed value to specified value form. Read more
impl<G, R, U> Debug for Image<G, R, U> where
G: Debug,
R: Debug,
U: Debug + ToCss,
[src]
G: Debug,
R: Debug,
U: Debug + ToCss,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<G, R, U> ToCss for Image<G, R, U> where
G: ToCss,
R: ToCss,
U: ToCss,
[src]
G: ToCss,
R: ToCss,
U: ToCss,