pub struct LockedMainContext<'a> { /* private fields */ }
Implementations§
Source§impl<'a> LockedMainContext<'a>
impl<'a> LockedMainContext<'a>
Sourcepub fn iteration(&self, may_block: bool) -> bool
pub fn iteration(&self, may_block: bool) -> bool
Runs a single iteration for the given main loop.
This involves checking to see if any event sources are ready to be
processed, then if no events sources are ready and may_block is true
,
waiting for a source to become ready, then dispatching the highest
priority events sources that are ready. Otherwise, if may_block is
false
sources are not waited to become ready, only those highest
priority events sources will be dispatched (if any), that are ready at
this given moment without further waiting.
Note that even when may_block is true
, it is still possible for
iteration
to return false
, since the wait may be interrupted for other
reasons than an event source becoming ready.
Returns true
if events were dispatched.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for LockedMainContext<'a>
impl<'a> RefUnwindSafe for LockedMainContext<'a>
impl<'a> !Send for LockedMainContext<'a>
impl<'a> !Sync for LockedMainContext<'a>
impl<'a> Unpin for LockedMainContext<'a>
impl<'a> UnwindSafe for LockedMainContext<'a>
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