pub struct NoHost;Expand description
A host with nothing to add — run(config, |_| Ok((app, NoHost))).
Trait Implementations§
Source§impl ShellHost for NoHost
impl ShellHost for NoHost
Source§fn on_frame(&mut self, _app: &mut App, _frame: &Frame)
fn on_frame(&mut self, _app: &mut App, _frame: &Frame)
Runs at the start of every painted frame, before layout and paint.
The hook for per-frame app state: advancing a wall-clock cell, pushing
frame.duration into a history buffer, feeding a runaway detector.Source§fn paint(&mut self, app: &mut App, ctx: &mut WgpuGfxCtx, frame: &Frame)
fn paint(&mut self, app: &mut App, ctx: &mut WgpuGfxCtx, frame: &Frame)
Render the frame’s contents. Read more
Source§fn after_paint(&mut self, _ctx: &mut WgpuGfxCtx, _frame: &Frame)
fn after_paint(&mut self, _ctx: &mut WgpuGfxCtx, _frame: &Frame)
Source§fn on_geometry_changed(&mut self, _geometry: WindowGeometry)
fn on_geometry_changed(&mut self, _geometry: WindowGeometry)
The OS window was resized, maximized, restored, or changed scale.
Source§fn on_close_requested(&mut self, _app: &mut App) -> bool
fn on_close_requested(&mut self, _app: &mut App) -> bool
The user asked the OS window to close (title-bar ×, Alt+F4, taskbar
close). Return
true to let the shell exit the loop; return false
to keep running. Read moreSource§fn on_idle(&mut self, _app: &mut App, _control: &mut ShellControl<'_>)
fn on_idle(&mut self, _app: &mut App, _control: &mut ShellControl<'_>)
Runs once per idle iteration of the event loop, after any frame this
iteration painted. The hook for app-owned auto-save, deferred work that
must not run inside event dispatch, and exit/relaunch requests.
Source§fn on_gpu_rebuilt(&mut self, _app: &mut App, _gpu: &Gpu)
fn on_gpu_rebuilt(&mut self, _app: &mut App, _gpu: &Gpu)
The wgpu device was lost (TDR, driver reset, GPU removal, RDP session
change) and the shell has rebuilt it. Every GPU resource created from
the old device is dead — textures, buffers, pipelines cached by
custom-render widgets — so drop them here and let them be recreated
from
gpu on the next frame.Auto Trait Implementations§
impl Freeze for NoHost
impl RefUnwindSafe for NoHost
impl Send for NoHost
impl Sync for NoHost
impl Unpin for NoHost
impl UnsafeUnpin for NoHost
impl UnwindSafe for NoHost
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more