Struct round_based::Msg [−][src]
Represent a message transmitting between parties on wire
Fields
sender: u16
Index of the sender
Lies in range [1; n]
where n
is number of parties involved in computation
receiver: Option<u16>
Index of receiver
None
indicates that it’s broadcast message. Receiver index, if set, lies in range [1; n]
where n
is number of parties involved in computation
body: B
Message body
Implementations
impl<B> Msg<B>
[src]
pub fn map_body<T, F>(self, f: F) -> Msg<T> where
F: FnOnce(B) -> T,
[src]
F: FnOnce(B) -> T,
Applies closure to message body
Trait Implementations
impl<B: Clone> Clone for Msg<B>
[src]
impl<B: Debug> Debug for Msg<B>
[src]
impl<'de, B> Deserialize<'de> for Msg<B> where
B: Deserialize<'de>,
[src]
B: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<B: PartialEq> PartialEq<Msg<B>> for Msg<B>
[src]
impl<B> Serialize for Msg<B> where
B: Serialize,
[src]
B: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<B> StructuralPartialEq for Msg<B>
[src]
Auto Trait Implementations
impl<B> RefUnwindSafe for Msg<B> where
B: RefUnwindSafe,
B: RefUnwindSafe,
impl<B> Send for Msg<B> where
B: Send,
B: Send,
impl<B> Sync for Msg<B> where
B: Sync,
B: Sync,
impl<B> Unpin for Msg<B> where
B: Unpin,
B: Unpin,
impl<B> UnwindSafe for Msg<B> where
B: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,