Struct style::values::generics::svg::SVGPaint
[−]
[src]
pub struct SVGPaint<ColorType, UrlPaintServer> { pub kind: SVGPaintKind<ColorType, UrlPaintServer>, pub fallback: Option<Either<ColorType, None_>>, }
An SVG paint value
Fields
kind: SVGPaintKind<ColorType, UrlPaintServer>
The paint source
fallback: Option<Either<ColorType, None_>>
The fallback color. It would be empty, the none
keyword or
Trait Implementations
impl<ColorType, UrlPaintServer> Animate for SVGPaint<ColorType, UrlPaintServer> where
SVGPaintKind<ColorType, UrlPaintServer>: Animate,
Option<Either<ColorType, None_>>: Animate,
[src]
SVGPaintKind<ColorType, UrlPaintServer>: Animate,
Option<Either<ColorType, None_>>: Animate,
fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>
[src]
Animate a value towards another one, given an animation procedure.
impl<ColorType: Clone, UrlPaintServer: Clone> Clone for SVGPaint<ColorType, UrlPaintServer>
[src]
fn clone(&self) -> SVGPaint<ColorType, UrlPaintServer>
[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<ColorType, UrlPaintServer> ComputeSquaredDistance for SVGPaint<ColorType, UrlPaintServer> where
SVGPaintKind<ColorType, UrlPaintServer>: ComputeSquaredDistance,
Option<Either<ColorType, None_>>: ComputeSquaredDistance,
[src]
SVGPaintKind<ColorType, UrlPaintServer>: ComputeSquaredDistance,
Option<Either<ColorType, None_>>: ComputeSquaredDistance,
fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()>
[src]
Computes the squared distance between two animatable values.
impl<ColorType: Debug, UrlPaintServer: Debug> Debug for SVGPaint<ColorType, UrlPaintServer>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<ColorType, UrlPaintServer> MallocSizeOf for SVGPaint<ColorType, UrlPaintServer> where
ColorType: MallocSizeOf,
UrlPaintServer: MallocSizeOf,
[src]
ColorType: MallocSizeOf,
UrlPaintServer: 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<ColorType: PartialEq, UrlPaintServer: PartialEq> PartialEq for SVGPaint<ColorType, UrlPaintServer>
[src]
fn eq(&self, __arg_0: &SVGPaint<ColorType, UrlPaintServer>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SVGPaint<ColorType, UrlPaintServer>) -> bool
[src]
This method tests for !=
.
impl<ColorType, UrlPaintServer> ToAnimatedValue for SVGPaint<ColorType, UrlPaintServer> where
SVGPaintKind<ColorType, UrlPaintServer>: ToAnimatedValue<AnimatedValue = SVGPaintKind<<ColorType as ToAnimatedValue>::AnimatedValue, <UrlPaintServer as ToAnimatedValue>::AnimatedValue>>,
UrlPaintServer: ToAnimatedValue,
ColorType: ToAnimatedValue,
Option<Either<ColorType, None_>>: ToAnimatedValue<AnimatedValue = Option<Either<<ColorType as ToAnimatedValue>::AnimatedValue, None_>>>,
[src]
SVGPaintKind<ColorType, UrlPaintServer>: ToAnimatedValue<AnimatedValue = SVGPaintKind<<ColorType as ToAnimatedValue>::AnimatedValue, <UrlPaintServer as ToAnimatedValue>::AnimatedValue>>,
UrlPaintServer: ToAnimatedValue,
ColorType: ToAnimatedValue,
Option<Either<ColorType, None_>>: ToAnimatedValue<AnimatedValue = Option<Either<<ColorType as ToAnimatedValue>::AnimatedValue, None_>>>,
type AnimatedValue = SVGPaint<<ColorType as ToAnimatedValue>::AnimatedValue, <UrlPaintServer as ToAnimatedValue>::AnimatedValue>
The type of the animated value.
fn to_animated_value(self) -> Self::AnimatedValue
[src]
Converts this value to an animated value.
fn from_animated_value(animated: Self::AnimatedValue) -> Self
[src]
Converts back an animated value into a computed value.
impl<ColorType, UrlPaintServer> ToComputedValue for SVGPaint<ColorType, UrlPaintServer> where
SVGPaintKind<ColorType, UrlPaintServer>: ToComputedValue<ComputedValue = SVGPaintKind<<ColorType as ToComputedValue>::ComputedValue, <UrlPaintServer as ToComputedValue>::ComputedValue>>,
UrlPaintServer: ToComputedValue,
ColorType: ToComputedValue,
Option<Either<ColorType, None_>>: ToComputedValue<ComputedValue = Option<Either<<ColorType as ToComputedValue>::ComputedValue, None_>>>,
[src]
SVGPaintKind<ColorType, UrlPaintServer>: ToComputedValue<ComputedValue = SVGPaintKind<<ColorType as ToComputedValue>::ComputedValue, <UrlPaintServer as ToComputedValue>::ComputedValue>>,
UrlPaintServer: ToComputedValue,
ColorType: ToComputedValue,
Option<Either<ColorType, None_>>: ToComputedValue<ComputedValue = Option<Either<<ColorType as ToComputedValue>::ComputedValue, None_>>>,
type ComputedValue = SVGPaint<<ColorType as ToComputedValue>::ComputedValue, <UrlPaintServer 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<ColorType, UrlPaintServer> ToCss for SVGPaint<ColorType, UrlPaintServer> where
SVGPaintKind<ColorType, UrlPaintServer>: ToCss,
Option<Either<ColorType, None_>>: ToCss,
[src]
SVGPaintKind<ColorType, UrlPaintServer>: ToCss,
Option<Either<ColorType, None_>>: ToCss,
fn to_css<W>(&self, dest: &mut W) -> Result where
W: Write,
[src]
W: Write,
Serialize self
in CSS syntax, writing to dest
.
fn to_css_string(&self) -> String
[src]
Serialize self
in CSS syntax and return a string. Read more
impl<ColorType: Parse, UrlPaintServer: Parse> Parse for SVGPaint<ColorType, UrlPaintServer>
[src]
fn parse<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>
) -> Result<Self, ParseError<'i>>
[src]
context: &ParserContext,
input: &mut Parser<'i, 't>
) -> Result<Self, ParseError<'i>>
Parse a value of this type. Read more