pub struct LoopState {
pub depth: i32,
pub breaks: i32,
pub contflag: i32,
}Expand description
Loop state for the executor
Fields§
§depth: i32Current nesting depth
breaks: i32Break requested (and how many levels)
contflag: i32Continue requested (and how many levels)
Implementations§
Source§impl LoopState
impl LoopState
pub fn new() -> Self
Sourcepub fn do_continue(&mut self, levels: i32)
pub fn do_continue(&mut self, levels: i32)
Request continue (from builtin continue)
Sourcepub fn should_break(&self) -> bool
pub fn should_break(&self) -> bool
Check if break is active
Sourcepub fn should_continue(&self) -> bool
pub fn should_continue(&self) -> bool
Check if continue is active
Sourcepub fn reset_flow(&mut self)
pub fn reset_flow(&mut self)
Reset break/continue (after handling)
Sourcepub fn current_depth(&self) -> i32
pub fn current_depth(&self) -> i32
Get current nesting depth
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LoopState
impl RefUnwindSafe for LoopState
impl Send for LoopState
impl Sync for LoopState
impl Unpin for LoopState
impl UnsafeUnpin for LoopState
impl UnwindSafe for LoopState
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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