Enum ControlFlow
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§
§impl ControlFlow
impl ControlFlow
pub fn is_continue(&self) -> bool
pub fn is_continue(&self) -> bool
Returns true if this is a Continue variant.
Trait Implementations§
§impl Clone for ControlFlow
impl Clone for ControlFlow
§fn clone(&self) -> ControlFlow
fn clone(&self) -> ControlFlow
Returns a duplicate 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 more§impl Debug for ControlFlow
impl Debug for ControlFlow
§impl From<ControlFlow<()>> for ControlFlow
impl From<ControlFlow<()>> for ControlFlow
§fn from(c: ControlFlow<()>) -> ControlFlow
fn from(c: ControlFlow<()>) -> ControlFlow
Converts to this type from the input type.
§impl From<ControlFlow> for ControlFlow<()>
impl From<ControlFlow> for ControlFlow<()>
§fn from(c: ControlFlow) -> ControlFlow<()>
fn from(c: ControlFlow) -> ControlFlow<()>
Converts to this type from the input type.
§impl From<ControlFlow> for Value
impl From<ControlFlow> for Value
§fn from(v: ControlFlow) -> Value
fn from(v: ControlFlow) -> Value
Converts to this type from the input type.
§impl From<ControlFlow> for bool
impl From<ControlFlow> for bool
§fn from(c: ControlFlow) -> bool
fn from(c: ControlFlow) -> bool
Converts to this type from the input type.
§impl From<bool> for ControlFlow
impl From<bool> for ControlFlow
§fn from(c: bool) -> ControlFlow
fn from(c: bool) -> ControlFlow
Converts to this type from the input type.
§impl PartialEq for ControlFlow
impl PartialEq for ControlFlow
§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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToSendValue for T
impl<T> ToSendValue for T
§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue clone of self.