Struct shadow_rs::utility::callback_queue::CallbackQueue
source · pub struct CallbackQueue(/* private fields */);
Expand description
A queue of events (functions/closures) which when run can add their own events to the queue. This allows events to be deferred and run later.
Implementations§
source§impl CallbackQueue
impl CallbackQueue
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
sourcepub fn run(&mut self)
pub fn run(&mut self)
Process all of the events in the queue (and any new events that are generated).
sourcepub fn queue_and_run<F, U>(f: F) -> U
pub fn queue_and_run<F, U>(f: F) -> U
A convenience function to create an EventQueue, allow the caller to add events, and process them all before returning.
Trait Implementations§
source§impl Default for CallbackQueue
impl Default for CallbackQueue
Auto Trait Implementations§
impl Freeze for CallbackQueue
impl !RefUnwindSafe for CallbackQueue
impl !Send for CallbackQueue
impl !Sync for CallbackQueue
impl Unpin for CallbackQueue
impl !UnwindSafe for CallbackQueue
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