[−][src]Enum chalk_ir::visit::ControlFlow
An copy of the unstable std::ops::ControlFlow
for use in Chalk visitors.
Variants
Continue in the loop, using the given value for the next iteration
Exit the loop, yielding the given value
Implementations
impl<B, C> ControlFlow<B, C>
[src]
pub fn is_break(&self) -> bool
[src]
Returns true
if this is a Break
variant.
pub fn is_continue(&self) -> bool
[src]
Returns true
if this is a Continue
variant.
pub fn break_value(self) -> Option<B>
[src]
Converts the ControlFlow
into an Option
which is Some
if the ControlFlow
was Break
and None
otherwise.
impl<B> ControlFlow<B, ()>
[src]
pub const CONTINUE: Self
[src]
It's frequently the case that there's no value needed with Continue
,
so this provides a way to avoid typing (())
, if you prefer it.
impl<C> ControlFlow<(), C>
[src]
pub const BREAK: Self
[src]
APIs like try_for_each
don't need values with Break
,
so this provides a way to avoid typing (())
, if you prefer it.
Auto Trait Implementations
impl<B, C> RefUnwindSafe for ControlFlow<B, C> where
B: RefUnwindSafe,
C: RefUnwindSafe,
[src]
B: RefUnwindSafe,
C: RefUnwindSafe,
impl<B, C> Send for ControlFlow<B, C> where
B: Send,
C: Send,
[src]
B: Send,
C: Send,
impl<B, C> Sync for ControlFlow<B, C> where
B: Sync,
C: Sync,
[src]
B: Sync,
C: Sync,
impl<B, C> Unpin for ControlFlow<B, C> where
B: Unpin,
C: Unpin,
[src]
B: Unpin,
C: Unpin,
impl<B, C> UnwindSafe for ControlFlow<B, C> where
B: UnwindSafe,
C: UnwindSafe,
[src]
B: UnwindSafe,
C: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Cast for T
[src]
pub fn cast<U>(self, interner: &U::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
[src]
Self: CastTo<U>,
U: HasInterner,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,