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 RGBAimpl Animate for Colorimpl<S> Animate for ShadowList<S> where
S: Animate + Clone + ToAnimatedZero,impl Animate for Auimpl Animate for Angleimpl Animate for FontSizeimpl Animate for KeywordInfoimpl Animate for FontSizeAdjustimpl Animate for LengthOrPercentageimpl Animate for LengthOrPercentageOrAutoimpl Animate for LengthOrPercentageOrNoneimpl Animate for CSSPixelLengthimpl Animate for MozLengthimpl Animate for MaxLengthimpl Animate for Percentageimpl<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 KeywordSizeimpl Animate for None_impl Animate for Autoimpl Animate for Normalimpl<A, B> Animate for Either<A, B> where
A: Animate,
B: Animate,impl Animate for style::properties::longhands::background_position_x::computed_value::Timpl Animate for style::properties::longhands::background_position_y::computed_value::Timpl Animate for style::properties::longhands::background_size::computed_value::Timpl Animate for AnimationValueimpl Animate for Visibilityimpl Animate for CalcLengthOrPercentageimpl Animate for FontWeightimpl Animate for FontStretchimpl Animate for ClipRectimpl Animate for ComputedTransformOperationimpl Animate for Translate2Dimpl Animate for InnerMatrix2Dimpl Animate for Scale2Dimpl Animate for MatrixDecomposed2Dimpl Animate for Matrix3Dimpl Animate for Matriximpl Animate for Translate3Dimpl Animate for Skewimpl Animate for Scale3Dimpl Animate for Perspectiveimpl Animate for MatrixDecomposed3Dimpl Animate for ComputedTransformimpl<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 AnimatedFilterimpl Animate for AnimatedFilterList