Enum css_style::transition::Transition[][src]

pub enum Transition {
    One(TransitionValue),
    Multiple(IndexMap<Cow<'static, str>, TransitionValue>),
    Initial,
    Inherit,
    None,
    Unset,
}
use css_style::{Style, unit::{sec, ms}};

Style::default()
    // transition for all properties
    .and_transition(|conf| conf.duration(sec(1.2)).ease())
    // transitions for specific properties
    .and_transition(|conf| {
        conf.insert("opacity", |conf| conf.duration(ms(150.)).ease().delay(sec(0.5)))
            .insert("width", |conf| conf.duration(ms(450.)).ease_in())
    });

Variants

Multiple(IndexMap<Cow<'static, str>, TransitionValue>)
Initial
Inherit
None
Unset

Implementations

impl Transition[src]

pub fn new() -> Self[src]

pub fn duration(self, val: impl Into<Duration>) -> Self[src]

pub fn timing_function(self, val: impl Into<TimingFunction>) -> Self[src]

pub fn try_timing_function(self, val: Option<impl Into<TimingFunction>>) -> Self[src]

pub fn ease(self) -> Self[src]

pub fn linear(self) -> Self[src]

pub fn ease_in(self) -> Self[src]

pub fn ease_out(self) -> Self[src]

pub fn ease_in_out(self) -> Self[src]

pub fn step_start(self) -> Self[src]

pub fn step_end(self) -> Self[src]

pub fn steps(self, intervals: usize, pos: impl Into<StepsPos>) -> Self[src]

pub fn cubic_bezier(self, n1: f32, n2: f32, n3: f32, n4: f32) -> Self[src]

pub fn delay(self, val: impl Into<Delay>) -> Self[src]

pub fn try_delay(self, val: Option<impl Into<Delay>>) -> Self[src]

pub fn insert(
    self,
    property: impl Into<Cow<'static, str>>,
    get_val: impl FnOnce(TransitionValue) -> TransitionValue
) -> Self
[src]

pub fn foreach(
    self,
    properties: impl IntoIterator<Item = impl Into<Cow<'static, str>>>,
    f: impl FnOnce(TransitionValue) -> TransitionValue + Clone
) -> Self
[src]

Trait Implementations

impl Clone for Transition[src]

impl Debug for Transition[src]

impl Default for Transition[src]

impl Display for Transition[src]

impl From<IndexMap<Cow<'static, str>, TransitionValue, RandomState>> for Transition[src]

impl From<TransitionValue> for Transition[src]

impl PartialEq<Transition> for Transition[src]

impl StructuralPartialEq for Transition[src]

impl StyleUpdater for Transition[src]

Auto Trait Implementations

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    T: Component + Float,
    D: AdaptFrom<S, Swp, Dwp, T>,
    Swp: WhitePoint,
    Dwp: WhitePoint
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.