use primitives::correlated_randomness::{
bundler::Bundler,
dabits::DaBit,
singlets::Singlet,
stream::{Next, NextVec},
triples::Triple,
};
use crate::{circuit::preprocessing::CircuitPreprocessing, config::MpcConfig, errors::AbortError};
pub mod bundler;
pub mod iterator;
pub trait BundlerPositions {
fn positions(&self) -> CircuitPreprocessing;
fn buffered(&self) -> CircuitPreprocessing;
#[allow(async_fn_in_trait)]
async fn resync(&self, targets: &CircuitPreprocessing) -> Result<(), AbortError>;
}
pub type NextSinglet<F> = Next<Singlet<F>, AbortError>;
pub type NextTriple<F> = Next<Triple<F>, AbortError>;
pub type NextDaBit<F> = Next<DaBit<F>, AbortError>;
pub type NextSinglets<F> = NextVec<Singlet<F>, AbortError>;
pub type NextTriples<F> = NextVec<Triple<F>, AbortError>;
pub type NextDaBits<F> = NextVec<DaBit<F>, AbortError>;
pub trait PreprocessingBundler<C: MpcConfig>:
Bundler<Iterator = iterator::PreprocessingIterator<C>>
{
}
impl<C: MpcConfig, T: Bundler<Iterator = iterator::PreprocessingIterator<C>>>
PreprocessingBundler<C> for T
{
}