Enum css_style::transition::Transition [−][src]
pub enum Transition {
One(TransitionValue),
Multiple(IndexMap<Cow<'static, str>, TransitionValue>),
Initial,
Inherit,
None,
Unset,
}
Expand description
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
One(TransitionValue)
Tuple Fields
Multiple(IndexMap<Cow<'static, str>, TransitionValue>)
Tuple Fields
0: IndexMap<Cow<'static, str>, TransitionValue>
Initial
Inherit
None
Unset
Implementations
pub fn insert(
self,
property: impl Into<Cow<'static, str>>,
get_val: impl FnOnce(TransitionValue) -> TransitionValue
) -> Self
pub fn foreach(
self,
properties: impl IntoIterator<Item = impl Into<Cow<'static, str>>>,
f: impl FnOnce(TransitionValue) -> TransitionValue + Clone
) -> Self
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for Transition
impl Send for Transition
impl Sync for Transition
impl Unpin for Transition
impl UnwindSafe for Transition
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
Mutably borrows from an owned value. Read more
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined
range, otherwise an OutOfBounds
error is returned which contains
the unclamped color. Read more