Struct Message

Source
pub struct Message<T, C> {
    pub time: T,
    pub data: C,
    pub from: usize,
    pub seq: usize,
}
Expand description

A serializable representation of timestamped data.

Fields§

§time: T

The timestamp associated with the message.

§data: C

The data in the message.

§from: usize

The source worker.

§seq: usize

A sequence number for this worker-to-worker stream.

Implementations§

Source§

impl<T, C> Message<T, C>

Source

pub fn default_length() -> usize

👎Deprecated: Use timely::buffer::default_capacity instead

Default buffer size.

Source§

impl<T, C: Container> Message<T, C>

Source

pub fn new(time: T, data: C, from: usize, seq: usize) -> Self

Creates a new message instance from arguments.

Source

pub fn push_at<P: Push<Message<T, C>>>(buffer: &mut C, time: T, pusher: &mut P)

Forms a message, and pushes contents at pusher. Replaces buffer with what the pusher leaves in place, or the container’s default element. The buffer is left in an undefined state.

Trait Implementations§

Source§

impl<T, C> Bytesable for Message<T, C>
where T: Serialize + for<'a> Deserialize<'a>, C: ContainerBytes,

Source§

fn from_bytes(bytes: Bytes) -> Self

Wrap bytes as Self.
Source§

fn length_in_bytes(&self) -> usize

The number of bytes required to serialize the data.
Source§

fn into_bytes<W: Write>(&self, writer: &mut W)

Writes the binary representation into writer.
Source§

impl<T: Clone, C: Clone> Clone for Message<T, C>

Source§

fn clone(&self) -> Message<T, C>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T, C: Accountable, P: Pull<Message<T, C>>> Pull<Message<T, C>> for LogPuller<P>

Source§

fn pull(&mut self) -> &mut Option<Message<T, C>>

Pulls an element and provides the opportunity to take ownership. Read more
Source§

fn recv(&mut self) -> Option<T>

Takes an Option<T> and leaves None behind.
Source§

impl<T: Timestamp, C: Accountable, P> Push<Message<T, C>> for Counter<T, C, P>
where P: Push<Message<T, C>>,

Source§

fn push(&mut self, message: &mut Option<Message<T, C>>)

Pushes element with the opportunity to take ownership.
Source§

fn send(&mut self, element: T)

Pushes element and drops any resulting resources.
Source§

fn done(&mut self)

Pushes None, conventionally signalling a flush.
Source§

impl<T: Eq + Clone, C, P, D> Push<Message<T, C>> for Exchange<T, P, D>
where P: Push<Message<T, C>>, D: Distributor<C>,

Source§

fn push(&mut self, message: &mut Option<Message<T, C>>)

Pushes element with the opportunity to take ownership.
Source§

fn send(&mut self, element: T)

Pushes element and drops any resulting resources.
Source§

fn done(&mut self)

Pushes None, conventionally signalling a flush.
Source§

impl<T, C: Accountable, P: Push<Message<T, C>>> Push<Message<T, C>> for LogPusher<P>

Source§

fn push(&mut self, pair: &mut Option<Message<T, C>>)

Pushes element with the opportunity to take ownership.
Source§

fn send(&mut self, element: T)

Pushes element and drops any resulting resources.
Source§

fn done(&mut self)

Pushes None, conventionally signalling a flush.
Source§

impl<T: Data, C: Container> Push<Message<T, C>> for Tee<T, C>

Source§

fn push(&mut self, message: &mut Option<Message<T, C>>)

Pushes element with the opportunity to take ownership.
Source§

fn send(&mut self, element: T)

Pushes element and drops any resulting resources.
Source§

fn done(&mut self)

Pushes None, conventionally signalling a flush.

Auto Trait Implementations§

§

impl<T, C> Freeze for Message<T, C>
where T: Freeze, C: Freeze,

§

impl<T, C> RefUnwindSafe for Message<T, C>

§

impl<T, C> Send for Message<T, C>
where T: Send, C: Send,

§

impl<T, C> Sync for Message<T, C>
where T: Sync, C: Sync,

§

impl<T, C> Unpin for Message<T, C>
where T: Unpin, C: Unpin,

§

impl<T, C> UnwindSafe for Message<T, C>
where T: UnwindSafe, C: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.
Source§

impl<T> Data for T
where T: Clone + 'static,

Source§

impl<T> Exchangeable for T
where T: Send + Any + Bytesable,