Struct timely::dataflow::operators::generic::FrontieredInputHandle[][src]

pub struct FrontieredInputHandle<'a, T: Timestamp, D: 'a, P: Pull<Bundle<T, D>> + 'a> {
    pub handle: &'a mut InputHandle<T, D, P>,
    pub frontier: &'a MutableAntichain<T>,
}

Handle to an operator’s input stream and frontier.

Fields

handle: &'a mut InputHandle<T, D, P>

The underlying input handle.

frontier: &'a MutableAntichain<T>

The frontier as reported by timely progress tracking.

Implementations

impl<'a, T: Timestamp, D: Data, P: Pull<Bundle<T, D>> + 'a> FrontieredInputHandle<'a, T, D, P>[src]

pub fn new(
    handle: &'a mut InputHandle<T, D, P>,
    frontier: &'a MutableAntichain<T>
) -> Self
[src]

Allocate a new frontiered input handle.

pub fn next(&mut self) -> Option<(CapabilityRef<'_, T>, RefOrMut<'_, Vec<D>>)>[src]

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.

pub fn for_each<F: FnMut(CapabilityRef<'_, T>, RefOrMut<'_, Vec<D>>)>(
    &mut self,
    logic: F
)
[src]

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_vec(&mut data.replace(Vec::new()));
               });
           });
});

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

Inspect the frontier associated with this input.

Auto Trait Implementations

impl<'a, T, D, P> !RefUnwindSafe for FrontieredInputHandle<'a, T, D, P>

impl<'a, T, D, P> !Send for FrontieredInputHandle<'a, T, D, P>

impl<'a, T, D, P> !Sync for FrontieredInputHandle<'a, T, D, P>

impl<'a, T, D, P> Unpin for FrontieredInputHandle<'a, T, D, P>

impl<'a, T, D, P> !UnwindSafe for FrontieredInputHandle<'a, T, D, P>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.