[][src]Struct raf::AnimationFrameScheduler

#[must_use]
pub struct AnimationFrameScheduler<Cb>(_);

Owns a WebRuntime and schedules its execution using requestAnimationFrame.

Methods

impl<T: Tick> AnimationFrameScheduler<T>[src]

pub fn new(ticker: T) -> Self[src]

Construct a new scheduler with the provided callback. ticker.tick() will be called once per fulfilled animation frame request.

pub fn run_on_every_frame(self)[src]

Consumes the scheduler to initiate a requestAnimationFrame callback loop where new animation frames are requested immmediately after the last moxie::Revision is completed. WebRuntime::run_once is called once per requested animation frame.

impl<T: Tick + Waking> AnimationFrameScheduler<T>[src]

pub fn run_on_wake(self)[src]

Consumes the scheduler to initiate a requestAnimationFrame callback loop where new animation frames are requested whenever the waker passed to the provided closure is woken.

Trait Implementations

impl<T: Tick> ArcWake for AnimationFrameScheduler<T>[src]

impl<Cb> Send for AnimationFrameScheduler<Cb>[src]

impl<Cb> Sync for AnimationFrameScheduler<Cb>[src]

Auto Trait Implementations

impl<Cb> !RefUnwindSafe for AnimationFrameScheduler<Cb>

impl<Cb> Unpin for AnimationFrameScheduler<Cb>

impl<Cb> !UnwindSafe for AnimationFrameScheduler<Cb>

Blanket Implementations

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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.