use core::convert::Infallible;
use crate::decode::state;
pub trait Set:
state::Set<
SyncOpen = Self::Body,
SyncFinished = Infallible,
TaskOpen = Self::Body,
TaskFinished = Infallible,
DuplexOpen = Infallible,
DuplexFinished = Infallible,
UnsupportedOpen = Infallible,
UnsupportedFinished = Infallible,
>
{
type Body;
}
pub trait Each<F: Set>: Sized {
type Output<'a>;
fn apply<'a>(self, body: &'a mut F::Body) -> Self::Output<'a>;
}
pub trait Fold<P, F: Set>: Sized {
type Output;
fn sync<S: state::Slot<P>>(self, slot: S, body: F::SyncOpen) -> Self::Output;
fn task<S: state::Slot<P>>(self, slot: S, body: F::TaskOpen) -> Self::Output;
}