use crate::container::CapacityContainerBuilder;
use crate::progress::Timestamp;
use crate::dataflow::{StreamVec, Scope};
use crate::dataflow::operators::core::{Input as InputCore};
pub trait Input<'scope> {
type Timestamp: Timestamp;
fn new_input<D: Clone+'static>(&self) -> (Handle<Self::Timestamp, D>, StreamVec<'scope, Self::Timestamp, D>);
fn input_from<D: Clone+'static>(&self, handle: &mut Handle<Self::Timestamp, D>) -> StreamVec<'scope, Self::Timestamp, D>;
}
use crate::order::TotalOrder;
impl<'scope, T: Timestamp + TotalOrder> Input<'scope> for Scope<'scope, T> {
type Timestamp = T;
fn new_input<D: Clone+'static>(&self) -> (Handle<T, D>, StreamVec<'scope, T, D>) {
InputCore::new_input(self)
}
fn input_from<D: Clone+'static>(&self, handle: &mut Handle<T, D>) -> StreamVec<'scope, T, D> {
InputCore::input_from(self, handle)
}
}
pub type Handle<T, D> = crate::dataflow::operators::core::input::Handle<T, CapacityContainerBuilder<Vec<D>>>;