pub enum ControlFlow {
Continue,
Break,
}
Expand description
Continue calling the closure in the future iterations or drop it.
This is the return type of idle_add
and timeout_add
closures.
ControlFlow::Continue
keeps the closure assigned, to be rerun when appropriate.
ControlFlow::Break
disconnects and drops it.
Continue
and Break
map to G_SOURCE_CONTINUE
(true
) and
G_SOURCE_REMOVE
(false
), respectively.
Variants§
Implementations§
Source§impl ControlFlow
impl ControlFlow
Trait Implementations§
Source§impl Clone for ControlFlow
impl Clone for ControlFlow
Source§fn clone(&self) -> ControlFlow
fn clone(&self) -> ControlFlow
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ControlFlow
impl Debug for ControlFlow
Source§impl From<ControlFlow<()>> for ControlFlow
impl From<ControlFlow<()>> for ControlFlow
Source§fn from(c: ControlFlow<()>) -> Self
fn from(c: ControlFlow<()>) -> Self
Converts to this type from the input type.
Source§impl From<ControlFlow> for ControlFlow<()>
impl From<ControlFlow> for ControlFlow<()>
Source§fn from(c: ControlFlow) -> Self
fn from(c: ControlFlow) -> Self
Converts to this type from the input type.
Source§impl From<ControlFlow> for Value
impl From<ControlFlow> for Value
Source§fn from(v: ControlFlow) -> Self
fn from(v: ControlFlow) -> Self
Converts to this type from the input type.
Source§impl From<ControlFlow> for bool
impl From<ControlFlow> for bool
Source§fn from(c: ControlFlow) -> Self
fn from(c: ControlFlow) -> Self
Converts to this type from the input type.
Source§impl From<bool> for ControlFlow
impl From<bool> for ControlFlow
Source§impl PartialEq for ControlFlow
impl PartialEq for ControlFlow
Source§impl ToValue for ControlFlow
impl ToValue for ControlFlow
impl Copy for ControlFlow
impl Eq for ControlFlow
impl StructuralPartialEq for ControlFlow
Auto Trait Implementations§
impl Freeze for ControlFlow
impl RefUnwindSafe for ControlFlow
impl Send for ControlFlow
impl Sync for ControlFlow
impl Unpin for ControlFlow
impl UnwindSafe for ControlFlow
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue
clone of self
.