pub struct Animation<'a> { /* private fields */ }Expand description
Animation instance.
Implementations§
Source§impl<'a> Animation<'a>
impl<'a> Animation<'a>
Sourcepub fn builder(
id: impl Into<Cow<'a, str>>,
name: impl Into<Cow<'a, str>>,
paused_state: bool,
play_state: impl Into<Cow<'a, str>>,
playback_rate: f64,
start_time: f64,
current_time: f64,
type_: impl Into<Cow<'a, str>>,
) -> AnimationBuilder<'a>
pub fn builder( id: impl Into<Cow<'a, str>>, name: impl Into<Cow<'a, str>>, paused_state: bool, play_state: impl Into<Cow<'a, str>>, playback_rate: f64, start_time: f64, current_time: f64, type_: impl Into<Cow<'a, str>>, ) -> AnimationBuilder<'a>
Creates a builder for this type with the required parameters:
id:Animation’s id.name:Animation’s name.paused_state:Animation’s internal paused state.play_state:Animation’s play state.playback_rate:Animation’s playback rate.start_time:Animation’s start time. Milliseconds for time based animations and percentage [0 - 100] for scroll driven animations (i.e. when viewOrScrollTimeline exists).current_time:Animation’s current time.type_: Animation type ofAnimation.
Sourcepub fn paused_state(&self) -> bool
pub fn paused_state(&self) -> bool
‘Animation’’s internal paused state.
Sourcepub fn play_state(&self) -> &str
pub fn play_state(&self) -> &str
‘Animation’’s play state.
Sourcepub fn playback_rate(&self) -> f64
pub fn playback_rate(&self) -> f64
‘Animation’’s playback rate.
Sourcepub fn start_time(&self) -> f64
pub fn start_time(&self) -> f64
‘Animation’’s start time. Milliseconds for time based animations and percentage [0 - 100] for scroll driven animations (i.e. when viewOrScrollTimeline exists).
Sourcepub fn current_time(&self) -> f64
pub fn current_time(&self) -> f64
‘Animation’’s current time.
Sourcepub fn source(&self) -> Option<&AnimationEffect<'a>>
pub fn source(&self) -> Option<&AnimationEffect<'a>>
‘Animation’’s source animation node.
Sourcepub fn css_id(&self) -> Option<&str>
pub fn css_id(&self) -> Option<&str>
A unique ID for ‘Animation’ representing the sources that triggered this CSS animation/transition.
Sourcepub fn view_or_scroll_timeline(&self) -> Option<&ViewOrScrollTimeline>
pub fn view_or_scroll_timeline(&self) -> Option<&ViewOrScrollTimeline>
View or scroll timeline
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for Animation<'a>
impl<'de, 'a> Deserialize<'de> for Animation<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for Animation<'a>
impl<'a> RefUnwindSafe for Animation<'a>
impl<'a> Send for Animation<'a>
impl<'a> Sync for Animation<'a>
impl<'a> Unpin for Animation<'a>
impl<'a> UnsafeUnpin for Animation<'a>
impl<'a> UnwindSafe for Animation<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more