pub trait Animate: Sized {
fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>;
}
Expand description
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 returns an error.
Trait bounds for type parameter Foo
can be opted out of with
#[animation(no_bound(Foo))]
on the type definition, trait bounds for
fields can be opted into with #[animation(field_bound)]
on the field.
Required Methods§
Implementations on Foreign Types§
Implementors§
impl Animate for AnimationValue
impl Animate for Visibility
impl Animate for AngleOrPercentage
impl Animate for NumberOrPercentage
impl Animate for ShapeBox
impl Animate for ShapeGeometryBox
impl Animate for VerticalAlignKeyword
impl Animate for FontSizeKeyword
impl Animate for DProperty
impl Animate for IsAbsolute
impl Animate for PathCommand
impl Animate for style::properties::longhands::background_position_x::computed_value::OwnedList<<T as ToAnimatedValue>::AnimatedValue>
impl Animate for style::properties::longhands::background_position_y::computed_value::OwnedList<<T as ToAnimatedValue>::AnimatedValue>
impl Animate for style::properties::longhands::background_size::computed_value::OwnedList<<T as ToAnimatedValue>::AnimatedValue>
impl Animate for style::properties::longhands::box_shadow::computed_value::OwnedList<<T as ToAnimatedValue>::AnimatedValue>
impl Animate for style::properties::longhands::filter::computed_value::OwnedList<<T as ToAnimatedValue>::AnimatedValue>
impl Animate for style::properties::longhands::text_shadow::computed_value::OwnedList<<T as ToAnimatedValue>::AnimatedValue>
impl Animate for Angle
impl Animate for FontSize
impl Animate for CSSPixelLength
impl Animate for LengthPercentage
https://drafts.csswg.org/css-transitions/#animtype-lpcalc https://drafts.csswg.org/css-values-4/#combine-math https://drafts.csswg.org/css-values-4/#combine-mixed
impl Animate for OffsetRotate
impl Animate for Percentage
impl Animate for Au
impl Animate for LetterSpacing
impl Animate for Path
impl Animate for TrackRepeat<LengthPercentage, Integer>
impl Animate for KeywordInfo
impl Animate for ArcFlag
impl Animate for CoordPair
impl Animate for SVGPathData
impl Animate for Auto
impl Animate for None_
impl Animate for RGBA
impl Animate for InnerMatrix2D
impl Animate for MatrixDecomposed2D
impl Animate for MatrixDecomposed3D
impl Animate for Perspective
impl Animate for Quaternion
impl Animate for Scale2D
impl Animate for Scale3D
impl Animate for Skew
impl Animate for Translate2D
impl Animate for Translate3D
impl Animate for FontVariationSettings
impl Animate for Ratio
https://drafts.csswg.org/css-values/#combine-ratio