pub struct CommandBus { /* private fields */ }Expand description
MPSC command bus for dispatching user actions to the presentation engine.
All user actions — from keyboard input, mouse events, or future external
control surfaces — are sent as Command values through this bus.
The engine polls the receiving end each frame via try_recv().
Implementations§
Source§impl CommandBus
impl CommandBus
Sourcepub fn sender(&self) -> CommandSender
pub fn sender(&self) -> CommandSender
Get a cloneable sender handle for dispatching commands.
Sourcepub fn into_receiver(self) -> CommandReceiver
pub fn into_receiver(self) -> CommandReceiver
Consume the bus and return the receiver (for the engine).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CommandBus
impl RefUnwindSafe for CommandBus
impl Send for CommandBus
impl Sync for CommandBus
impl Unpin for CommandBus
impl UnsafeUnpin for CommandBus
impl UnwindSafe for CommandBus
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