pub struct AppEventProxy { /* private fields */ }Expand description
A thread-safe handle for posting AppEvents to the UI thread.
Clone and send to background threads. The event loop wakes up and processes the event like any other input.
Implementations§
Source§impl AppEventProxy
impl AppEventProxy
Sourcepub fn send_background_complete(&self, operation_id: String)
pub fn send_background_complete(&self, operation_id: String)
Post a background completion event.
Sourcepub fn send_background_progress(
&self,
operation_id: String,
percent: f32,
message: String,
)
pub fn send_background_progress( &self, operation_id: String, percent: f32, message: String, )
Post a background progress event.
Sourcepub fn send_external(&self, payload: impl Any + Send + 'static)
pub fn send_external(&self, payload: impl Any + Send + 'static)
Post an arbitrary external event.
Sourcepub fn send_external_boxed(&self, payload: Box<dyn Any + Send>)
pub fn send_external_boxed(&self, payload: Box<dyn Any + Send>)
Post a pre-boxed external event. Used by callers that already
hold a Box<dyn Any + Send> (notably
TitleBarHostCallbacks::post_external, which abstracts the
posting mechanism behind a closure that teksilo-core can hold
without depending on winit).
Sourcepub fn post_subscription_event(
&self,
sub_id: SubscriptionId,
event: Box<dyn Any + Send>,
)
pub fn post_subscription_event( &self, sub_id: SubscriptionId, event: Box<dyn Any + Send>, )
Post a backend-event delivery for the given subscription id. Called by the framework’s event-source wrapper from the publisher thread.
Trait Implementations§
Source§impl AppEventPoster for AppEventProxy
AppEventProxy implements AppEventPoster directly so it can be both the
Arc<dyn AppEventPoster> every widget tree holds AND handed to background
integrations (e.g. the teksilo-async executor’s cross-thread waker, wired
via TeksiloAppBuilder::on_ready). teksilo-core cannot import winit, so
this trait implementation lives here.
impl AppEventPoster for AppEventProxy
AppEventProxy implements AppEventPoster directly so it can be both the
Arc<dyn AppEventPoster> every widget tree holds AND handed to background
integrations (e.g. the teksilo-async executor’s cross-thread waker, wired
via TeksiloAppBuilder::on_ready). teksilo-core cannot import winit, so
this trait implementation lives here.
fn post_subscription_event( &self, sub_id: SubscriptionId, event: Box<dyn Any + Send>, )
Source§impl Clone for AppEventProxy
impl Clone for AppEventProxy
Source§fn clone(&self) -> AppEventProxy
fn clone(&self) -> AppEventProxy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for AppEventProxy
impl RefUnwindSafe for AppEventProxy
impl Send for AppEventProxy
impl Sync for AppEventProxy
impl Unpin for AppEventProxy
impl UnsafeUnpin for AppEventProxy
impl UnwindSafe for AppEventProxy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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)
&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)
&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
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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