Struct style::values::generics::position::Position
[−]
[src]
pub struct Position<H, V> { pub horizontal: H, pub vertical: V, }
A generic type for representing a CSS position.
Fields
horizontal: H
The horizontal component of position.
vertical: V
The vertical component of position.
Methods
impl<H, V> Position<H, V>
[src]
Trait Implementations
impl<H, V> Animate for Position<H, V> where
H: Animate,
V: Animate,
[src]
H: Animate,
V: Animate,
fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>
[src]
Animate a value towards another one, given an animation procedure.
impl<H: Clone, V: Clone> Clone for Position<H, V>
[src]
fn clone(&self) -> Position<H, V>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<H, V> ComputeSquaredDistance for Position<H, V> where
H: ComputeSquaredDistance,
V: ComputeSquaredDistance,
[src]
H: ComputeSquaredDistance,
V: ComputeSquaredDistance,
fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()>
[src]
Computes the squared distance between two animatable values.
impl<H: Copy, V: Copy> Copy for Position<H, V>
[src]
impl<H: Debug, V: Debug> Debug for Position<H, V>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<H, V> MallocSizeOf for Position<H, V> where
H: MallocSizeOf,
V: MallocSizeOf,
[src]
H: MallocSizeOf,
V: MallocSizeOf,
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more
impl<H: PartialEq, V: PartialEq> PartialEq for Position<H, V>
[src]
fn eq(&self, __arg_0: &Position<H, V>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Position<H, V>) -> bool
[src]
This method tests for !=
.
impl<H, V> ToAnimatedZero for Position<H, V> where
H: ToAnimatedZero,
V: ToAnimatedZero,
[src]
H: ToAnimatedZero,
V: ToAnimatedZero,
fn to_animated_zero(&self) -> Result<Self, ()>
[src]
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. Read more
impl<H, V> ToComputedValue for Position<H, V> where
H: ToComputedValue,
V: ToComputedValue,
[src]
H: ToComputedValue,
V: ToComputedValue,
type ComputedValue = Position<<H as ToComputedValue>::ComputedValue, <V as ToComputedValue>::ComputedValue>
The computed value type we're going to be converted to.
fn to_computed_value(&self, context: &Context) -> Self::ComputedValue
[src]
Convert a specified value to a computed value, using itself and the data inside the Context
. Read more
fn from_computed_value(computed: &Self::ComputedValue) -> Self
[src]
Convert a computed value to specified value form. Read more
impl<H, V> RepeatableListAnimatable for Position<H, V> where
H: RepeatableListAnimatable,
V: RepeatableListAnimatable,
[src]
H: RepeatableListAnimatable,
V: RepeatableListAnimatable,