pub enum CycleDetectorResult<B, T> {
Continue,
Break(B),
Cycle(T),
}Expand description
Result of CycleDetector.
Variants§
Continue
Processing continued.
Break(B)
Processing stopped from a user-defined break.
Cycle(T)
A cycle was detected.
Implementations§
Source§impl<B, T> CycleDetectorResult<B, T>
impl<B, T> CycleDetectorResult<B, T>
Sourcepub fn to_controlflow(self) -> ControlFlow<Self>
pub fn to_controlflow(self) -> ControlFlow<Self>
Converts the result to a ControlFlow.
Sourcepub fn is_continue(&self) -> bool
pub fn is_continue(&self) -> bool
Returns true if the result is Continue.
Sourcepub fn break_value(self) -> Option<B>
pub fn break_value(self) -> Option<B>
Returns the value if the result is Break, otherwise None.
Sourcepub fn cycle_value(self) -> Option<T>
pub fn cycle_value(self) -> Option<T>
Returns the value if the result is Cycle, otherwise None.
Auto Trait Implementations§
impl<B, T> Freeze for CycleDetectorResult<B, T>
impl<B, T> RefUnwindSafe for CycleDetectorResult<B, T>where
B: RefUnwindSafe,
T: RefUnwindSafe,
impl<B, T> Send for CycleDetectorResult<B, T>
impl<B, T> Sync for CycleDetectorResult<B, T>
impl<B, T> Unpin for CycleDetectorResult<B, T>
impl<B, T> UnwindSafe for CycleDetectorResult<B, T>where
B: UnwindSafe,
T: UnwindSafe,
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, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.