mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Part 1: Support field_bound on Animate.
So we can derive Animate on more generic types. Differential Revision: https://phabricator.services.mozilla.com/D16339
This commit is contained in:
parent
7efbd9cde6
commit
a8943d2ec5
2 changed files with 29 additions and 17 deletions
|
@ -113,7 +113,8 @@ pub fn animate_multiplicative_factor(
|
|||
/// function has been specified through `#[animate(fallback)]`.
|
||||
///
|
||||
/// Trait bounds for type parameter `Foo` can be opted out of with
|
||||
/// `#[animation(no_bound(Foo))]` on the type definition.
|
||||
/// `#[animation(no_bound(Foo))]` on the type definition, trait bounds for
|
||||
/// fields can be opted into with `#[animation(field_bound)]` on the field.
|
||||
pub trait Animate: Sized {
|
||||
/// Animate a value towards another one, given an animation procedure.
|
||||
fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue