pub struct CommandSender { /* private fields */ }Expand description
Cloneable, thread-safe producer for application commands.
Enqueueing a command wakes the platform loop. wake only
schedules the runtime; it never synthesizes a widget event.
Each send returns the command’s sequence number, which its handlers see as
Command::sequence and dispatch diagnostics record.
Implementations§
Source§impl CommandSender
impl CommandSender
pub fn wake(&self)
pub fn send<T>( &self, target: CommandTarget, key: CommandKey<T>, payload: T, ) -> u64
pub fn broadcast<T>( &self, target: CommandTarget, key: CommandKey<T>, payload: T, ) -> u64
pub fn send_widget<T>( &self, window_id: WindowId, widget_id: WidgetId, key: CommandKey<T>, payload: T, ) -> u64
pub fn send_focused<T>( &self, window_id: WindowId, key: CommandKey<T>, payload: T, ) -> u64
pub fn send_window<T>( &self, window_id: WindowId, key: CommandKey<T>, payload: T, ) -> u64
pub fn send_application<T>(&self, key: CommandKey<T>, payload: T) -> u64
pub fn broadcast_window<T>( &self, window_id: WindowId, key: CommandKey<T>, payload: T, ) -> u64
pub fn broadcast_application<T>(&self, key: CommandKey<T>, payload: T) -> u64
Trait Implementations§
Source§impl Clone for CommandSender
impl Clone for CommandSender
Auto Trait Implementations§
impl Freeze for CommandSender
impl RefUnwindSafe for CommandSender
impl Send for CommandSender
impl Sync for CommandSender
impl Unpin for CommandSender
impl UnsafeUnpin for CommandSender
impl UnwindSafe for CommandSender
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