Struct Message

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

A serializable representation of timestamped data.

Fields§

§time: T

The timestamp associated with the message.

§data: D

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, D> Message<T, D>

Source

pub fn default_length() -> usize

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

Default buffer size.

Source§

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

Source

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

Creates a new message instance from arguments.

Source

pub fn push_at<P: Push<BundleCore<T, D>>>( buffer: &mut D, 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.

Trait Implementations§

Source§

impl<T, D> Abomonation for Message<T, D>
where T: Abomonation, D: Abomonation,

Source§

unsafe fn entomb<W: Write>(&self, _write: &mut W) -> Result<()>

Write any additional information about &self beyond its binary representation. Read more
Source§

fn extent(&self) -> usize

Reports the number of further bytes required to entomb self.
Source§

unsafe fn exhume<'a, 'b>( &'a mut self, bytes: &'b mut [u8], ) -> Option<&'b mut [u8]>

Recover any information for &mut self not evident from its binary representation. Read more
Source§

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

Source§

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

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<'de, T, D> Deserialize<'de> for Message<T, D>
where T: Deserialize<'de>, D: Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T, D> Serialize for Message<T, D>
where T: Serialize, D: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

impl<T, D> UnwindSafe for Message<T, D>
where T: UnwindSafe, D: 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> 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> Data for T
where T: Send + Sync + Any + Abomonation + 'static,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ExchangeData for T
where T: Data + Data,