pub struct WebBackend { /* private fields */ }Expand description
A minimal, host-driven WASM backend.
This backend is intended to be driven by a JS host:
- push events via
Self::events_mut - advance time via
Self::clock_mut - read rendered buffers via
Self::presenter_mut
Implementations§
Source§impl WebBackend
impl WebBackend
Sourcepub fn clock_mut(&mut self) -> &mut DeterministicClock
pub fn clock_mut(&mut self) -> &mut DeterministicClock
Mutably access the clock.
Sourcepub fn events_mut(&mut self) -> &mut WebEventSource
pub fn events_mut(&mut self) -> &mut WebEventSource
Mutably access the event source.
Sourcepub fn presenter_mut(&mut self) -> &mut WebPresenter
pub fn presenter_mut(&mut self) -> &mut WebPresenter
Mutably access the presenter.
Trait Implementations§
Source§impl Backend for WebBackend
impl Backend for WebBackend
Source§type Error = WebBackendError
type Error = WebBackendError
Platform-specific error type shared across sub-traits.
Source§type Clock = DeterministicClock
type Clock = DeterministicClock
Clock implementation.
Source§type Events = WebEventSource
type Events = WebEventSource
Event source implementation.
Source§type Presenter = WebPresenter
type Presenter = WebPresenter
Presenter implementation.
Source§impl Clone for WebBackend
impl Clone for WebBackend
Source§fn clone(&self) -> WebBackend
fn clone(&self) -> WebBackend
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 moreAuto Trait Implementations§
impl Freeze for WebBackend
impl RefUnwindSafe for WebBackend
impl Send for WebBackend
impl Sync for WebBackend
impl Unpin for WebBackend
impl UnsafeUnpin for WebBackend
impl UnwindSafe for WebBackend
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