use std::fmt::Debug;
use serde::{de::DeserializeOwned, Serialize};
use wincode::{SchemaRead, SchemaWrite};
use crate::{
sharing::{Reconstructible, Verifiable},
types::Batched,
};
pub mod bundler;
pub mod generator;
pub mod stream;
pub mod types;
pub use types::{dabits, powpairs, singlets, triples};
pub trait Correlation:
'static
+ Debug
+ Sized
+ Send
+ Sync
+ Clone
+ PartialEq
+ Serialize
+ DeserializeOwned
+ SchemaWrite<Src = Self>
+ for<'a> SchemaRead<'a>
+ Reconstructible
+ Verifiable
{
}
impl<
T: 'static
+ Debug
+ Sized
+ Send
+ Sync
+ Clone
+ PartialEq
+ Serialize
+ DeserializeOwned
+ Verifiable
+ for<'a> wincode::SchemaRead<'a, Dst = T>
+ wincode::SchemaWrite<Src = T>,
> Correlation for T
{
}
pub trait CorrelatedBatch: Correlation + Batched<Item: Correlation> {}
impl<T: Correlation + Batched<Item: Correlation>> CorrelatedBatch for T {}