pub struct AppEventSender(/* private fields */);Expand description
A sender that can awake apps and insert events into the main loop.
A Clone of the sender is available in UPDATES.sender.
Implementations§
Source§impl AppEventSender
impl AppEventSender
Sourcepub fn send_update(
&self,
op: UpdateOp,
target: impl Into<Option<WidgetId>>,
) -> Result<(), AppChannelError>
pub fn send_update( &self, op: UpdateOp, target: impl Into<Option<WidgetId>>, ) -> Result<(), AppChannelError>
Causes an update cycle to happen in the app.
Sourcepub fn send_resume_unwind(
&self,
payload: Box<dyn Any + Send + 'static>,
) -> Result<(), AppChannelError>
pub fn send_resume_unwind( &self, payload: Box<dyn Any + Send + 'static>, ) -> Result<(), AppChannelError>
Resume a panic in the app main loop thread.
Sourcepub fn waker(&self, target: impl Into<Option<WidgetId>>) -> Waker
pub fn waker(&self, target: impl Into<Option<WidgetId>>) -> Waker
Create an Waker that causes a send_update.
Sourcepub fn ext_channel<T>(&self) -> (AppExtSender<T>, AppExtReceiver<T>)
pub fn ext_channel<T>(&self) -> (AppExtSender<T>, AppExtReceiver<T>)
Create an unbound channel that causes an extension update for each message received.
Sourcepub fn ext_channel_bounded<T>(
&self,
cap: usize,
) -> (AppExtSender<T>, AppExtReceiver<T>)
pub fn ext_channel_bounded<T>( &self, cap: usize, ) -> (AppExtSender<T>, AppExtReceiver<T>)
Create a bounded channel that causes an extension update for each message received.
Trait Implementations§
Source§impl Clone for AppEventSender
impl Clone for AppEventSender
Source§fn clone(&self) -> AppEventSender
fn clone(&self) -> AppEventSender
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 AppEventSender
impl RefUnwindSafe for AppEventSender
impl Send for AppEventSender
impl Sync for AppEventSender
impl Unpin for AppEventSender
impl UnwindSafe for AppEventSender
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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