Struct map_gui::load::FutureLoader [−][src]
pub struct FutureLoader<A, T> where
A: AppLike, { loading_title: String, started: Instant, panel: Panel, receiver: Receiver<Result<Box<dyn Send + FnOnce(&A) -> T>>>, on_load: Option<Box<dyn FnOnce(&mut EventCtx<'_>, &mut A, Result<T>) -> Transition<A>>>, outer_progress_receiver: Option<Receiver<String>>, inner_progress_receiver: Option<Receiver<String>>, last_outer_progress: String, last_inner_progress: String, runtime: Runtime, }
Fields
loading_title: String
started: Instant
panel: Panel
receiver: Receiver<Result<Box<dyn Send + FnOnce(&A) -> T>>>
on_load: Option<Box<dyn FnOnce(&mut EventCtx<'_>, &mut A, Result<T>) -> Transition<A>>>
outer_progress_receiver: Option<Receiver<String>>
inner_progress_receiver: Option<Receiver<String>>
last_outer_progress: String
last_inner_progress: String
runtime: Runtime
Implementations
impl<A, T> FutureLoader<A, T> where
A: 'static + AppLike,
T: 'static,
[src]
impl<A, T> FutureLoader<A, T> where
A: 'static + AppLike,
T: 'static,
[src]pub fn new_state(
ctx: &mut EventCtx<'_>,
future: Pin<Box<dyn Send + Future<Output = Result<Box<dyn Send + FnOnce(&A) -> T>>>>>,
outer_progress_receiver: Receiver<String>,
inner_progress_receiver: Receiver<String>,
loading_title: &str,
on_load: Box<dyn FnOnce(&mut EventCtx<'_>, &mut A, Result<T>) -> Transition<A>>
) -> Box<dyn State<A>>
[src]
ctx: &mut EventCtx<'_>,
future: Pin<Box<dyn Send + Future<Output = Result<Box<dyn Send + FnOnce(&A) -> T>>>>>,
outer_progress_receiver: Receiver<String>,
inner_progress_receiver: Receiver<String>,
loading_title: &str,
on_load: Box<dyn FnOnce(&mut EventCtx<'_>, &mut A, Result<T>) -> Transition<A>>
) -> Box<dyn State<A>>
Trait Implementations
impl<A, T> State<A> for FutureLoader<A, T> where
A: 'static + AppLike,
T: 'static,
[src]
impl<A, T> State<A> for FutureLoader<A, T> where
A: 'static + AppLike,
T: 'static,
[src]fn event(&mut self, ctx: &mut EventCtx<'_>, app: &mut A) -> Transition<A>
[src]
fn draw(&self, g: &mut GfxCtx<'_>, _: &A)
[src]
pub fn draw_baselayer(&self) -> DrawBaselayer
pub fn on_destroy(&mut self, &mut EventCtx<'_>, &mut A)
Auto Trait Implementations
impl<A, T> !RefUnwindSafe for FutureLoader<A, T>
impl<A, T> !Send for FutureLoader<A, T>
impl<A, T> !Sync for FutureLoader<A, T>
impl<A, T> Unpin for FutureLoader<A, T>
impl<A, T> !UnwindSafe for FutureLoader<A, T>
Blanket Implementations
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,