use crate::Primitives;
pub trait IOBoundary<P: Primitives> {}
pub trait Source<P: Primitives>: IOBoundary<P> {
type TypeDefinition: crate::user::type_::TypeDefinition<P>;
fn source_type(&self) -> &Self::TypeDefinition;
type GroundingMap: crate::user::morphism::GroundingMap<P>;
fn source_grounding(&self) -> &Self::GroundingMap;
}
pub trait Sink<P: Primitives>: IOBoundary<P> {
type TypeDefinition: crate::user::type_::TypeDefinition<P>;
fn sink_type(&self) -> &Self::TypeDefinition;
type ProjectionMap: crate::user::morphism::ProjectionMap<P>;
fn sink_projection(&self) -> &Self::ProjectionMap;
}
pub trait BoundaryEffect<P: Primitives>: crate::kernel::effect::ExternalEffect<P> {
type IOBoundary: IOBoundary<P>;
fn effect_boundary(&self) -> &Self::IOBoundary;
fn is_idempotent(&self) -> P::Boolean;
}
pub trait IngestEffect<P: Primitives>: BoundaryEffect<P> {
type Source: Source<P>;
fn ingest_source(&self) -> &Self::Source;
}
pub trait EmitEffect<P: Primitives>: BoundaryEffect<P> {
type Sink: Sink<P>;
fn emit_sink(&self) -> &Self::Sink;
}
pub trait BoundaryProtocol<P: Primitives> {
type TypeDefinition: crate::user::type_::TypeDefinition<P>;
fn protocol_type(&self) -> &Self::TypeDefinition;
type CompositeConstraint: crate::user::type_::CompositeConstraint<P>;
fn protocol_ordering(&self) -> &Self::CompositeConstraint;
}
pub trait BoundarySession<P: Primitives>: crate::user::state::Session<P> {
type IOBoundary: IOBoundary<P>;
fn session_boundaries(&self) -> &[Self::IOBoundary];
fn crossing_count(&self) -> P::NonNegativeInteger;
}