Trait style::values::animated::ToAnimatedZero
[−]
[src]
pub trait ToAnimatedZero: Sized {
fn to_animated_zero(&self) -> Result<Self, ()>;
}Returns a value similar to self that represents zero.
This trait is derivable with #[derive(ToAnimatedValue)]. If a field is
annotated with #[animation(constant)], a clone of its value will be used
instead of calling ToAnimatedZero::to_animated_zero on it.
If a variant is annotated with #[animation(error)], the corresponding
match arm is not generated.
Required Methods
fn to_animated_zero(&self) -> Result<Self, ()>
Returns a value that, when added with an underlying value, will produce the underlying value. This is used for SMIL animation's "by-animation" where SMIL first interpolates from the zero value to the 'by' value, and then adds the result to the underlying value.
This is not the necessarily the same as the initial value of a property. For example, the initial value of 'stroke-width' is 1, but the zero value is 0, since adding 1 to the underlying value will not produce the underlying value.
Implementations on Foreign Types
impl ToAnimatedZero for f32[src]
fn to_animated_zero(&self) -> Result<Self, ()>[src]
impl ToAnimatedZero for f64[src]
fn to_animated_zero(&self) -> Result<Self, ()>[src]
impl ToAnimatedZero for i32[src]
fn to_animated_zero(&self) -> Result<Self, ()>[src]
impl<T> ToAnimatedZero for Option<T> where
T: ToAnimatedZero, [src]
T: ToAnimatedZero,
fn to_animated_zero(&self) -> Result<Self, ()>[src]
Implementors
impl ToAnimatedZero for RGBAimpl ToAnimatedZero for Colorimpl<S> ToAnimatedZero for ShadowList<S>impl ToAnimatedZero for FilterListimpl ToAnimatedZero for Auimpl ToAnimatedZero for Angleimpl ToAnimatedZero for BackgroundSizeimpl ToAnimatedZero for BorderSpacingimpl ToAnimatedZero for BorderCornerRadiusimpl ToAnimatedZero for FontSizeimpl ToAnimatedZero for KeywordInfoimpl ToAnimatedZero for FontSizeAdjustimpl ToAnimatedZero for CalcLengthOrPercentageimpl ToAnimatedZero for LengthOrPercentageimpl ToAnimatedZero for CSSPixelLengthimpl ToAnimatedZero for MozLengthimpl ToAnimatedZero for Percentageimpl ToAnimatedZero for LineHeightimpl ToAnimatedZero for TransformOperationimpl ToAnimatedZero for Transformimpl<B, T, U> ToAnimatedZero for ShapeSource<B, T, U>impl<L> ToAnimatedZero for VerticalAlign<L>impl<Color, SizeLength, BlurShapeLength, ShapeLength> ToAnimatedZero for BoxShadow<Color, SizeLength, BlurShapeLength, ShapeLength> where
SimpleShadow<Color, SizeLength, BlurShapeLength>: ToAnimatedZero,
ShapeLength: ToAnimatedZero,impl<Color, SizeLength, ShapeLength> ToAnimatedZero for SimpleShadow<Color, SizeLength, ShapeLength> where
Color: ToAnimatedZero,
SizeLength: ToAnimatedZero,
ShapeLength: ToAnimatedZero,impl<H, V> ToAnimatedZero for Position<H, V> where
H: ToAnimatedZero,
V: ToAnimatedZero,impl<ColorType, UrlPaintServer> ToAnimatedZero for SVGPaintKind<ColorType, UrlPaintServer> where
ColorType: ToAnimatedZero,impl<LengthOrPercentage, Number> ToAnimatedZero for SvgLengthOrPercentageOrNumber<LengthOrPercentage, Number> where
LengthOrPercentage: ToAnimatedZero,
Number: ToAnimatedZero,impl<LengthType> ToAnimatedZero for SVGLength<LengthType> where
LengthType: ToAnimatedZero,impl<OpacityType> ToAnimatedZero for SVGOpacity<OpacityType> where
OpacityType: ToAnimatedZero,impl<V> ToAnimatedZero for Spacing<V> where
V: From<Au>,impl<H, V, Depth> ToAnimatedZero for TransformOrigin<H, V, Depth> where
H: ToAnimatedZero,
V: ToAnimatedZero,
Depth: ToAnimatedZero,impl<T> ToAnimatedZero for NonNegative<T> where
T: ToAnimatedZero,impl<T> ToAnimatedZero for GreaterThanOrEqualToOne<T> where
T: ToAnimatedZero,impl ToAnimatedZero for KeywordSizeimpl ToAnimatedZero for None_impl ToAnimatedZero for Autoimpl ToAnimatedZero for Normalimpl<A, B> ToAnimatedZero for Either<A, B> where
A: ToAnimatedZero,
B: ToAnimatedZero,impl ToAnimatedZero for style::properties::longhands::background_position_x::computed_value::Timpl ToAnimatedZero for style::properties::longhands::background_position_y::computed_value::Timpl ToAnimatedZero for style::properties::longhands::background_size::computed_value::Timpl ToAnimatedZero for AnimationValueimpl ToAnimatedZero for Visibilityimpl ToAnimatedZero for LengthOrPercentageOrAutoimpl ToAnimatedZero for LengthOrPercentageOrNoneimpl ToAnimatedZero for MaxLengthimpl ToAnimatedZero for FontWeightimpl ToAnimatedZero for FontStretchimpl ToAnimatedZero for ClipRectimpl ToAnimatedZero for IntermediateSVGPaintimpl<L> ToAnimatedZero for SVGStrokeDashArray<L> where
L: ToAnimatedZero,impl ToAnimatedZero for AnimatedFilter