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
Combines PostAction
values returned from nested event sources.
impl BitOr for PostAction
Combines PostAction
values returned from nested event sources.
Source§impl BitOrAssign for PostAction
Combines PostAction
values returned from nested event sources.
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 more