pub struct FrontieredInputHandleCore<'a, T: Timestamp, C: Container + 'a, P: Pull<Bundle<T, C>> + 'a> {
    pub handle: &'a mut InputHandleCore<T, C, P>,
    pub frontier: &'a MutableAntichain<T>,
}
Expand description

Handle to an operator’s input stream and frontier.

Fields§

§handle: &'a mut InputHandleCore<T, C, P>

The underlying input handle.

§frontier: &'a MutableAntichain<T>

The frontier as reported by timely progress tracking.

Implementations§

source§

impl<'a, T: Timestamp, C: Container, P: Pull<Bundle<T, C>> + 'a> FrontieredInputHandleCore<'a, T, C, P>

source

pub fn new( handle: &'a mut InputHandleCore<T, C, P>, frontier: &'a MutableAntichain<T>, ) -> Self

Allocate a new frontiered input handle.

source

pub fn next(&mut self) -> Option<(InputCapability<T>, &mut C)>

Reads the next input buffer (at some timestamp t) and a corresponding capability for t. The timestamp t of the input buffer can be retrieved by invoking .time() on the capability. Returns None when there’s no more data available.

source

pub fn for_each<F: FnMut(InputCapability<T>, &mut C)>(&mut self, logic: F)

Repeatedly calls logic till exhaustion of the available input data. logic receives a capability and an input buffer.

§Examples
use timely::dataflow::operators::ToStream;
use timely::dataflow::operators::generic::Operator;
use timely::dataflow::channels::pact::Pipeline;

timely::example(|scope| {
    (0..10).to_stream(scope)
           .unary(Pipeline, "example", |_cap,_info| |input, output| {
               input.for_each(|cap, data| {
                   output.session(&cap).give_container(data);
               });
           });
});
source

pub fn frontier(&self) -> &'a MutableAntichain<T>

Inspect the frontier associated with this input.

Auto Trait Implementations§

§

impl<'a, T, C, P> Freeze for FrontieredInputHandleCore<'a, T, C, P>

§

impl<'a, T, C, P> !RefUnwindSafe for FrontieredInputHandleCore<'a, T, C, P>

§

impl<'a, T, C, P> !Send for FrontieredInputHandleCore<'a, T, C, P>

§

impl<'a, T, C, P> !Sync for FrontieredInputHandleCore<'a, T, C, P>

§

impl<'a, T, C, P> Unpin for FrontieredInputHandleCore<'a, T, C, P>

§

impl<'a, T, C, P> !UnwindSafe for FrontieredInputHandleCore<'a, T, C, P>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.