[][src]Struct round_based::containers::P2PMsgs

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

Received P2P messages from every protocol participant

Implementations

impl<B> P2PMsgs<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(mut self: 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 P2PMsgs<B>[src]

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

type Output = B

The returned type after indexing.

pub 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 P2PMsgs<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?

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

Returns messages in ascending party's index order

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

Auto Trait Implementations

impl<B> RefUnwindSafe for P2PMsgs<B> where
    B: RefUnwindSafe
[src]

impl<B> Send for P2PMsgs<B> where
    B: Send
[src]

impl<B> Sync for P2PMsgs<B> where
    B: Sync
[src]

impl<B> Unpin for P2PMsgs<B> where
    B: Unpin
[src]

impl<B> UnwindSafe for P2PMsgs<B> where
    B: UnwindSafe
[src]

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.