[][src]Struct swarm_it::Payload

pub struct Payload<T: PartialEq> {
    pub cargo: T,
    // some fields omitted
}

Represnets the Payload object. Payload is transferred around by Carriers.

Fields

cargo: T

This is the actual payload

Methods

impl<T: PartialEq> Payload<T>[src]

pub fn new(cargo: T) -> Payload<T>[src]

Creates new Payload

Example

let payload = swarm_it::Payload::<char>::new('X');

Trait Implementations

impl<T: Clone + PartialEq> Clone for Payload<T>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: PartialEq> PartialEq<Payload<T>> for Payload<T>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<T: Copy + PartialEq> Copy for Payload<T>[src]

impl<T: Debug + PartialEq> Debug for Payload<T>[src]

Auto Trait Implementations

impl<T> Sync for Payload<T> where
    T: Sync

impl<T> Send for Payload<T> where
    T: Send

impl<T> Unpin for Payload<T> where
    T: Unpin

impl<T> RefUnwindSafe for Payload<T> where
    T: RefUnwindSafe

impl<T> UnwindSafe for Payload<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,