pub struct NullWindowRenderer { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Clone for NullWindowRenderer
impl Clone for NullWindowRenderer
Source§fn clone(&self) -> NullWindowRenderer
fn clone(&self) -> NullWindowRenderer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NullWindowRenderer
Source§impl Default for NullWindowRenderer
impl Default for NullWindowRenderer
Source§fn default() -> NullWindowRenderer
fn default() -> NullWindowRenderer
Returns the “default value” for a type. Read more
Source§impl RenderContext for NullWindowRenderer
impl RenderContext for NullWindowRenderer
fn try_register_custom_resource( &mut self, resource: Box<dyn Any>, ) -> Result<ResourceId, RegisterResourceError>
fn unregister_resource(&mut self, resource_id: ResourceId)
Source§impl WindowRenderer for NullWindowRenderer
impl WindowRenderer for NullWindowRenderer
type ScenePainter<'a> = NullScenePainter where Self: 'a
Source§fn resume<F: FnOnce() + 'static>(
&mut self,
_window: Arc<dyn WindowHandle>,
_width: u32,
_height: u32,
on_ready: F,
)
fn resume<F: FnOnce() + 'static>( &mut self, _window: Arc<dyn WindowHandle>, _width: u32, _height: u32, on_ready: F, )
Begin resuming the renderer.
on_ready fires when initialization completes —
synchronously inside resume on native, asynchronously (via
wasm_bindgen_futures::spawn_local) on wasm32-unknown-unknown. After it
fires, the embedder must call complete_resume to
transition the renderer to the active state.Source§fn complete_resume(&mut self) -> bool
fn complete_resume(&mut self) -> bool
Finalize a previously-initiated resume. Returns
true once the renderer is
active and ready to render. Idempotent on already-active renderers; returns
false if a pending init has not yet produced a result. Read morefn suspend(&mut self)
fn is_active(&self) -> bool
fn set_size(&mut self, _width: u32, _height: u32)
fn render<F: FnOnce(&mut Self::ScenePainter<'_>)>(&mut self, _draw_fn: F)
Source§fn is_pending(&self) -> bool
fn is_pending(&self) -> bool
Returns
true while an asynchronous resume is in flight (after resume
but before complete_resume has succeeded). Defaults to false for
backends with synchronous initialization.Auto Trait Implementations§
impl Freeze for NullWindowRenderer
impl RefUnwindSafe for NullWindowRenderer
impl Send for NullWindowRenderer
impl Sync for NullWindowRenderer
impl Unpin for NullWindowRenderer
impl UnsafeUnpin for NullWindowRenderer
impl UnwindSafe for NullWindowRenderer
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