Enum calloop::sources::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
source§fn eq(&self, other: &PostAction) -> bool
fn eq(&self, other: &PostAction) -> bool
self
and other
values to be equal, and is used
by ==
.