Trait style::values::animated::Animate
[−]
[src]
pub trait Animate: Sized { fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>; }
Animate from one value to another.
This trait is derivable with #[derive(Animate)]
. The derived
implementation uses a match
expression with identical patterns for both
self
and other
, calling Animate::animate
on each fields of the values.
If a field is annotated with #[animation(constant)]
, the two values should
be equal or an error is returned.
If a variant is annotated with #[animation(error)]
, the corresponding
match
arm is not generated.
If the two values are not similar, an error is returned unless a fallback
function has been specified through #[animate(fallback)]
.
Required Methods
fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>
Animate a value towards another one, given an animation procedure.
Implementations on Foreign Types
impl Animate for i32
[src]
impl Animate for f32
[src]
impl Animate for f64
[src]
impl<T> Animate for Option<T> where
T: Animate,
[src]
T: Animate,
impl<T> Animate for Size2D<T> where
T: Animate + Copy,
[src]
T: Animate + Copy,
impl<T> Animate for Point2D<T> where
T: Animate + Copy,
[src]
T: Animate + Copy,
impl<T> Animate for SmallVec<[T; 1]> where
T: RepeatableListAnimatable,
[src]
T: RepeatableListAnimatable,
impl<T> Animate for Vec<T> where
T: RepeatableListAnimatable,
[src]
T: RepeatableListAnimatable,
Implementors
impl Animate for RGBA
impl Animate for Color
impl<S> Animate for ShadowList<S> where
S: Animate + Clone + ToAnimatedZero,impl Animate for Au
impl Animate for Angle
impl Animate for FontSize
impl Animate for KeywordInfo
impl Animate for FontSizeAdjust
impl Animate for LengthOrPercentage
impl Animate for LengthOrPercentageOrAuto
impl Animate for LengthOrPercentageOrNone
impl Animate for CSSPixelLength
impl Animate for MozLength
impl Animate for MaxLength
impl Animate for Percentage
impl<LengthOrPercentageOrAuto> Animate for BackgroundSize<LengthOrPercentageOrAuto> where
LengthOrPercentageOrAuto: Animate,impl<BasicShape, ReferenceBox, ImageOrUrl> Animate for ShapeSource<BasicShape, ReferenceBox, ImageOrUrl> where
BasicShape: Animate,
Option<ReferenceBox>: PartialEq,
Option<ReferenceBox>: Clone,impl<H, V, LengthOrPercentage> Animate for BasicShape<H, V, LengthOrPercentage> where
InsetRect<LengthOrPercentage>: Animate,
Circle<H, V, LengthOrPercentage>: Animate,
Ellipse<H, V, LengthOrPercentage>: Animate,
Polygon<LengthOrPercentage>: Animate,impl<LengthOrPercentage> Animate for InsetRect<LengthOrPercentage> where
Rect<LengthOrPercentage>: Animate,
Option<BorderRadius<LengthOrPercentage>>: Animate,impl<H, V, LengthOrPercentage> Animate for Circle<H, V, LengthOrPercentage> where
Position<H, V>: Animate,
ShapeRadius<LengthOrPercentage>: Animate,impl<H, V, LengthOrPercentage> Animate for Ellipse<H, V, LengthOrPercentage> where
Position<H, V>: Animate,
ShapeRadius<LengthOrPercentage>: Animate,impl<LengthOrPercentage> Animate for ShapeRadius<LengthOrPercentage> where
LengthOrPercentage: Animate,impl<L> Animate for Polygon<L> where
L: Animate,impl<L> Animate for BorderCornerRadius<L> where
Size<L>: Animate,impl<L> Animate for BorderSpacing<L> where
Size<L>: Animate,impl<LengthOrPercentage> Animate for BorderRadius<LengthOrPercentage> where
BorderCornerRadius<LengthOrPercentage>: Animate,impl<LengthOrPercentage> Animate for VerticalAlign<LengthOrPercentage> where
LengthOrPercentage: Animate,impl<Color, SizeLength, BlurShapeLength, ShapeLength> Animate for BoxShadow<Color, SizeLength, BlurShapeLength, ShapeLength> where
SimpleShadow<Color, SizeLength, BlurShapeLength>: Animate,
ShapeLength: Animate,impl<Color, SizeLength, ShapeLength> Animate for SimpleShadow<Color, SizeLength, ShapeLength> where
Color: Animate,
SizeLength: Animate,
ShapeLength: Animate,impl<H, V> Animate for Position<H, V> where
H: Animate,
V: Animate,impl<T> Animate for Rect<T> where
T: Animate,impl<L> Animate for Size<L> where
Size2D<L>: Animate,impl<ColorType, UrlPaintServer> Animate for SVGPaint<ColorType, UrlPaintServer> where
SVGPaintKind<ColorType, UrlPaintServer>: Animate,
Option<Either<ColorType, None_>>: Animate,impl<ColorType, UrlPaintServer> Animate for SVGPaintKind<ColorType, UrlPaintServer> where
ColorType: Animate,impl<Value> Animate for Spacing<Value> where
Value: Animate + From<Au>,impl<Number, LengthOrPercentage> Animate for LineHeight<Number, LengthOrPercentage> where
Number: Animate,
LengthOrPercentage: Animate,impl<H, V, Depth> Animate for TransformOrigin<H, V, Depth> where
H: Animate,
V: Animate,
Depth: Animate,impl<T> Animate for Transform<T> where
Vec<T>: Animate,impl<T> Animate for NonNegative<T> where
T: Animate,impl<T> Animate for GreaterThanOrEqualToOne<T> where
T: Animate,impl Animate for KeywordSize
impl Animate for None_
impl Animate for Auto
impl Animate for Normal
impl<A, B> Animate for Either<A, B> where
A: Animate,
B: Animate,impl Animate for style::properties::longhands::background_position_x::computed_value::T
impl Animate for style::properties::longhands::background_position_y::computed_value::T
impl Animate for style::properties::longhands::background_size::computed_value::T
impl Animate for AnimationValue
impl Animate for Visibility
impl Animate for CalcLengthOrPercentage
impl Animate for FontWeight
impl Animate for FontStretch
impl Animate for ClipRect
impl Animate for ComputedTransformOperation
impl Animate for Translate2D
impl Animate for InnerMatrix2D
impl Animate for Scale2D
impl Animate for MatrixDecomposed2D
impl Animate for Matrix3D
impl Animate for Matrix
impl Animate for Translate3D
impl Animate for Skew
impl Animate for Scale3D
impl Animate for Perspective
impl Animate for MatrixDecomposed3D
impl Animate for ComputedTransform
impl<L, N> Animate for SvgLengthOrPercentageOrNumber<L, N> where
L: Animate + From<LengthOrPercentage> + Into<NumberOrPercentage> + Copy,
N: Animate + From<Number> + Into<NumberOrPercentage>,
LengthOrPercentage: From<L>,
Self: Copy,impl<L> Animate for SVGLength<L> where
L: Animate + Clone,impl<L> Animate for SVGStrokeDashArray<L> where
L: Clone + RepeatableListAnimatable,impl<O> Animate for SVGOpacity<O> where
O: Animate + Clone,impl Animate for AnimatedFilter
impl Animate for AnimatedFilterList