Enum chalk_ir::visit::ControlFlow [−][src]
pub enum ControlFlow<B, C = ()> { Continue(C), Break(B), }
Expand description
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]
impl<B, C> ControlFlow<B, C>
[src]pub fn is_continue(&self) -> bool
[src]
pub fn is_continue(&self) -> bool
[src]Returns true
if this is a Continue
variant.
pub fn break_value(self) -> Option<B>
[src]
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]
impl<B> ControlFlow<B, ()>
[src]impl<C> ControlFlow<(), C>
[src]
impl<C> ControlFlow<(), C>
[src]Auto Trait Implementations
impl<B, C> RefUnwindSafe for ControlFlow<B, C> where
B: RefUnwindSafe,
C: RefUnwindSafe,
B: RefUnwindSafe,
C: RefUnwindSafe,
impl<B, C> Send for ControlFlow<B, C> where
B: Send,
C: Send,
B: Send,
C: Send,
impl<B, C> Sync for ControlFlow<B, C> where
B: Sync,
C: Sync,
B: Sync,
C: Sync,
impl<B, C> Unpin for ControlFlow<B, C> where
B: Unpin,
C: Unpin,
B: Unpin,
C: Unpin,
impl<B, C> UnwindSafe for ControlFlow<B, C> where
B: UnwindSafe,
C: UnwindSafe,
B: UnwindSafe,
C: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Cast for T
[src]
impl<T> Cast for T
[src]fn cast<U>(self, interner: &U::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
[src]
fn cast<U>(self, interner: &U::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
[src]Cast a value to type U
using CastTo
.