pub enum Repeated<T> {
Done {
value: T,
steps: usize,
},
Exhausted {
steps: usize,
},
}Expand description
How a run of steps ended.
Variants§
Done
A step said it was done, with value, after steps steps — that
one among them.
Exhausted
All steps steps were taken, and none said it was done: the work
is unfinished.
Implementations§
Source§impl<T> Repeated<T>
impl<T> Repeated<T>
Sourcepub fn done_or<E>(self, exhausted: impl FnOnce(usize) -> E) -> Result<T, E>
pub fn done_or<E>(self, exhausted: impl FnOnce(usize) -> E) -> Result<T, E>
What the run was done with, or exhausted(steps) for a run that
was not.
Sourcepub fn done(self, what: impl Display) -> GeopResult<T>
pub fn done(self, what: impl Display) -> GeopResult<T>
What the run was done with, or an error saying that what did not
finish within the steps it was given.
Trait Implementations§
impl<T: Copy> Copy for Repeated<T>
impl<T: Eq> Eq for Repeated<T>
impl<T: PartialEq> StructuralPartialEq for Repeated<T>
Auto Trait Implementations§
impl<T> Freeze for Repeated<T>where
T: Freeze,
impl<T> RefUnwindSafe for Repeated<T>where
T: RefUnwindSafe,
impl<T> Send for Repeated<T>where
T: Send,
impl<T> Sync for Repeated<T>where
T: Sync,
impl<T> Unpin for Repeated<T>where
T: Unpin,
impl<T> UnsafeUnpin for Repeated<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Repeated<T>where
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