[][src]Enum keebrs::net::Msg

pub enum Msg<T> {
    Broadcast {
        to: i8,
        from: i8,
        data: T,
    },
    Direct {
        to: i8,
        from: i8,
        data: T,
    },
}

Variants

Broadcast

Fields of Broadcast

to: i8from: i8data: T
Direct

Fields of Direct

to: i8from: i8data: T

Implementations

impl<T> Msg<T>[src]

pub fn broadcast(data: T) -> Self[src]

pub fn direct(to: i8, data: T) -> Self[src]

pub fn set_from(&mut self, new_from: i8)[src]

pub fn unpack(self) -> (i8, T)[src]

Trait Implementations

impl<T: Clone> Clone for Msg<T>[src]

impl<T: Copy> Copy for Msg<T>[src]

impl<T: Debug> Debug for Msg<T>[src]

impl<'de, T> Deserialize<'de> for Msg<T> where
    T: Deserialize<'de>, 
[src]

impl<T: Eq> Eq for Msg<T>[src]

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

impl<T> Serialize for Msg<T> where
    T: Serialize
[src]

impl<R, T> Sink<Msg<T>> for Background<R, T> where
    R: RawMutex
[src]

type Error = !

The type of value produced by the sink when an error occurs.

impl<T, LW, LR, RW, RR> Sink<Msg<T>> for ChainNet<T, LW, LR, RW, RR> where
    LW: Write,
    RW: Write<Error = LW::Error>,
    T: Serialize + Clone
[src]

type Error = WriteFrameError<LW::Error, Error>

The type of value produced by the sink when an error occurs.

impl<T> StructuralEq for Msg<T>[src]

impl<T> StructuralPartialEq for Msg<T>[src]

Auto Trait Implementations

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

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

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

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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.