[−][src]Struct raf::AnimationFrameScheduler
Owns a WebRuntime
and schedules its execution using
requestAnimationFrame
.
Implementations
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]
pub fn wake_by_ref(arc_self: &Arc<AnimationFrameScheduler<T>>)
[src]
pub fn wake(self: Arc<Self>)
impl<Cb> Send for AnimationFrameScheduler<Cb>
[src]
impl<Cb> Sync for AnimationFrameScheduler<Cb>
[src]
Auto Trait Implementations
impl<Cb> !RefUnwindSafe for AnimationFrameScheduler<Cb>
[src]
impl<Cb> Unpin for AnimationFrameScheduler<Cb>
[src]
impl<Cb> !UnwindSafe for AnimationFrameScheduler<Cb>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,