[][src]Struct erdos::dataflow::stream::internal_read_stream::InternalReadStream

pub struct InternalReadStream<D: Data> { /* fields omitted */ }

Methods

impl<D: Data> InternalReadStream<D>[src]

pub fn new() -> Self[src]

Create a stream into which we can write data.

pub fn new_with_id_name(id: StreamId, name: &str) -> Self[src]

pub fn get_id(&self) -> StreamId[src]

pub fn get_name(&self) -> &str[src]

pub fn from_endpoint(
    recv_endpoint: RecvEndpoint<Message<D>>,
    id: StreamId
) -> Self
[src]

pub fn add_callback<F: 'static + Fn(Timestamp, D)>(&mut self, callback: F)[src]

Add a callback to be invoked when the stream receives a message.

pub fn add_watermark_callback<F: 'static + Fn(&Timestamp)>(
    &mut self,
    callback: F
)
[src]

Add a callback to be invoked after the stream received, and the operator processed all the messages with a timestamp.

pub fn add_state<S: State>(
    &mut self,
    state: S
) -> Rc<RefCell<InternalStatefulReadStream<D, S>>>
[src]

Returns a new instance of the stream with state associated to it.

Trait Implementations

impl<D: Data> Default for InternalReadStream<D>[src]

impl<D: Data> EventMakerT for InternalReadStream<D>[src]

type EventDataType = D

impl<D: Data> From<InternalReadStream<D>> for ReadStream<D>[src]

impl<D: Data> ReadStreamT for InternalReadStream<D>[src]

type DataType = D

fn try_read(&mut self) -> Option<Message<D>>[src]

Tries to read a message from a channel.

Returns an immutable reference, or None if no messages are available at the moment (i.e., non-blocking read).

fn read(&mut self) -> Option<Message<D>>[src]

Blocking read. Returns None if the stream doesn't have a receive endpoint.

Auto Trait Implementations

impl<D> !RefUnwindSafe for InternalReadStream<D>

impl<D> !Send for InternalReadStream<D>

impl<D> !Sync for InternalReadStream<D>

impl<D> Unpin for InternalReadStream<D>

impl<D> !UnwindSafe for InternalReadStream<D>

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> FromPy<T> for T[src]

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

impl<T, U> IntoPy<U> for T where
    U: FromPy<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.