mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Document #[animation(no_bound(…))] and #[distance(field_bound)]
This commit is contained in:
parent
dcae5860a8
commit
a6aac0ed5f
2 changed files with 10 additions and 0 deletions
|
@ -21,6 +21,10 @@ use std::ops::Add;
|
|||
///
|
||||
/// If the two values are not similar, an error is returned unless a fallback
|
||||
/// function has been specified through `#[distance(fallback)]`.
|
||||
///
|
||||
/// 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 `#[distance(field_bound)]` on the field.
|
||||
pub trait ComputeSquaredDistance {
|
||||
/// Computes the squared distance between two animatable values.
|
||||
fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue