Enum calloop::PostAction
source · pub enum PostAction {
Continue,
Reregister,
Disable,
Remove,
}
Expand description
Possible actions that can be requested to the event loop by an event source once its events have been processed.
PostAction
values can be combined with the |
(bit-or) operator (or with
|=
) with the result that:
- if both values are identical, the result is that value
- if they are different, the result is
Reregister
Bit-or-ing these results is useful for composed sources to combine the
results of their child sources, but note that it only applies to the child
sources. For example, if every child source returns Continue
, the result
will be Continue
, but the parent source might still need to return
Reregister
or something else depending on any additional logic it uses.
Variants§
Continue
Continue listening for events on this source as before
Reregister
Trigger a re-registration of this source
Disable
Disable this source
Has the same effect as LoopHandle::disable
Remove
Remove this source from the eventloop
Has the same effect as LoopHandle::kill
Trait Implementations§
source§impl BitOr for PostAction
impl BitOr for PostAction
Combines PostAction
values returned from nested event sources.
source§impl BitOrAssign for PostAction
impl BitOrAssign for PostAction
Combines PostAction
values returned from nested event sources.
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|=
operation. Read moresource§impl Clone for PostAction
impl Clone for PostAction
source§fn clone(&self) -> PostAction
fn clone(&self) -> PostAction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PostAction
impl Debug for PostAction
source§impl PartialEq for PostAction
impl PartialEq for PostAction
impl Copy for PostAction
impl Eq for PostAction
impl StructuralPartialEq for PostAction
Auto Trait Implementations§
impl Freeze for PostAction
impl RefUnwindSafe for PostAction
impl Send for PostAction
impl Sync for PostAction
impl Unpin for PostAction
impl UnwindSafe for PostAction
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)