use crate::Primitives;
pub trait ProductiveStream<P: Primitives> {
fn is_productive(&self) -> P::Boolean;
}
pub trait Epoch<P: Primitives> {
type EulerCascade: crate::kernel::cascade::EulerCascade<P>;
fn epoch_cascade(&self) -> &Self::EulerCascade;
type Datum: crate::kernel::schema::Datum<P>;
fn epoch_output(&self) -> &Self::Datum;
type Context: crate::user::state::Context<P>;
fn epoch_context(&self) -> &Self::Context;
fn epoch_index(&self) -> P::NonNegativeInteger;
}
pub trait EpochBoundary<P: Primitives> {
type Epoch: Epoch<P>;
fn boundary_from(&self) -> &Self::Epoch;
fn boundary_to(&self) -> &Self::Epoch;
type Context: crate::user::state::Context<P>;
fn continuation_context(&self) -> &Self::Context;
}
pub trait StreamPrefix<P: Primitives> {
type Epoch: Epoch<P>;
fn prefix_epochs(&self) -> &[Self::Epoch];
fn prefix_length(&self) -> P::PositiveInteger;
}
pub trait StreamMorphism<P: Primitives>: crate::user::morphism::Transform<P> {}
pub trait Unfold<P: Primitives> {
type Context: crate::user::state::Context<P>;
fn unfold_seed(&self) -> &Self::Context;
type ComputationDatum: crate::user::morphism::ComputationDatum<P>;
fn unfold_step(&self) -> &Self::ComputationDatum;
type ProductiveStream: ProductiveStream<P>;
fn unfold_result(&self) -> &Self::ProductiveStream;
}