pub struct StdRuntime { /* private fields */ }Expand description
Convenience container bundling the standard scheduler and clock.
Implementations§
Source§impl StdRuntime
impl StdRuntime
Sourcepub fn runtime(&self) -> Runtime
pub fn runtime(&self) -> Runtime
Returns a cranpose_core::Runtime configured with the standard scheduler.
Sourcepub fn runtime_handle(&self) -> RuntimeHandle
pub fn runtime_handle(&self) -> RuntimeHandle
Returns a handle to the runtime.
Sourcepub fn frame_clock(&self) -> FrameClock
pub fn frame_clock(&self) -> FrameClock
Returns the runtime’s frame clock.
Sourcepub fn scheduler(&self) -> Arc<StdScheduler>
pub fn scheduler(&self) -> Arc<StdScheduler>
Returns the scheduler implementation.
Sourcepub fn take_frame_request(&self) -> bool
pub fn take_frame_request(&self) -> bool
Returns whether a frame was requested since the last poll.
Sourcepub fn set_frame_waker(&self, waker: impl Fn() + Send + Sync + 'static)
pub fn set_frame_waker(&self, waker: impl Fn() + Send + Sync + 'static)
Registers a waker to be called when the runtime schedules a new frame.
Sourcepub fn clear_frame_waker(&self)
pub fn clear_frame_waker(&self)
Clears any previously registered frame waker.
Sourcepub fn drain_frame_callbacks(&self, frame_time_nanos: u64)
pub fn drain_frame_callbacks(&self, frame_time_nanos: u64)
Drains pending frame callbacks using the provided frame timestamp in nanoseconds.
Trait Implementations§
Source§impl Clone for StdRuntime
impl Clone for StdRuntime
Source§fn clone(&self) -> StdRuntime
fn clone(&self) -> StdRuntime
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StdRuntime
impl Debug for StdRuntime
Auto Trait Implementations§
impl Freeze for StdRuntime
impl !RefUnwindSafe for StdRuntime
impl !Send for StdRuntime
impl !Sync for StdRuntime
impl Unpin for StdRuntime
impl !UnwindSafe for StdRuntime
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