Struct round_based::containers::BroadcastMsgs[][src]

pub struct BroadcastMsgs<B> { /* fields omitted */ }

Received broadcast messages from every protocol participant

Implementations

impl<B> BroadcastMsgs<B> where
    B: 'static, 
[src]

pub fn into_iter_indexed(self) -> impl Iterator<Item = (u16, B)>[src]

Turns a container into iterator of messages with parties indexes (1 <= i <= n)

pub fn into_vec(self) -> Vec<B>[src]

Turns container into vec of n-1 messages

pub fn into_vec_including_me(self, me: B) -> Vec<B>[src]

Turns container into vec of n messages (where given message lies at index party_i-1)

Trait Implementations

impl<B: Debug> Debug for BroadcastMsgs<B>[src]

impl<B> Index<u16> for BroadcastMsgs<B>[src]

type Output = B

The returned type after indexing.

fn index(&self, index: u16) -> &Self::Output[src]

Takes party index i and returns received message (1 <= i <= n)

Panics

Panics if there’s no party with index i (or it’s your party index)

impl<B> IntoIterator for BroadcastMsgs<B>[src]

type Item = B

The type of the elements being iterated over.

type IntoIter = <Vec<B> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

fn into_iter(self) -> Self::IntoIter[src]

Returns messages in ascending party’s index order

impl<M> MessageContainer for BroadcastMsgs<M>[src]

Auto Trait Implementations

impl<B> RefUnwindSafe for BroadcastMsgs<B> where
    B: RefUnwindSafe

impl<B> Send for BroadcastMsgs<B> where
    B: Send

impl<B> Sync for BroadcastMsgs<B> where
    B: Sync

impl<B> Unpin for BroadcastMsgs<B> where
    B: Unpin

impl<B> UnwindSafe for BroadcastMsgs<B> where
    B: UnwindSafe

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