13 lines
495 B
Rust
13 lines
495 B
Rust
use super::{controlflow::ControlFlowInstance, *};
|
|
|
|
/// Represents wrapped results which are instantly available.
|
|
pub trait LocalFunctor<'a>: WeakFunctor<'a> {
|
|
/// Extract iteration state, if successful.
|
|
fn unstuff<A: 'a, B: 'a>(state: Self::F<ControlFlow<B, A>>) -> ControlFlow<Self::F<B>, A> {
|
|
Self::stuff::<_, ControlFlowInstance<_>>(state)
|
|
}
|
|
|
|
/// Stuff wrapped result into another functor.
|
|
fn stuff<A: 'a, T: Pure<'a>>(fa: Self::F<T::F<A>>) -> T::F<Self::F<A>>;
|
|
}
|