pub struct RoundMsgs<M> { /* private fields */ }Expand description
List of received messages
Implementations§
Source§impl<M> RoundMsgs<M>
impl<M> RoundMsgs<M>
Sourcepub fn into_vec_without_me(self) -> Vec<M>
pub fn into_vec_without_me(self) -> Vec<M>
Returns vec of n-1 received messages
Messages appear in the list in ascending order of sender index. E.g. for n=4 and local party index i=2,
the list would look like: [{msg from i=0}, {msg from i=1}, {msg from i=3}].
Sourcepub fn into_vec_including_me(self, my_msg: M) -> Vec<M>
pub fn into_vec_including_me(self, my_msg: M) -> Vec<M>
Returns vec of received messages plus party’s own message
Similar to into_vec_without_me, but inserts my_msg at position i in resulting list. Thus, i-th
message in the list was received from i-th party.
Sourcepub fn iter_including_me<'m>(
&'m self,
my_msg: &'m M,
) -> impl Iterator<Item = &'m M>
pub fn iter_including_me<'m>( &'m self, my_msg: &'m M, ) -> impl Iterator<Item = &'m M>
Returns iterator over received messages plus party’s own message
Similar to .iter(), but inserts my_msg at position i. Thus, i-th message in the
iterator is the message received from party i.
Sourcepub fn into_iter_including_me(self, my_msg: M) -> impl Iterator<Item = M>
pub fn into_iter_including_me(self, my_msg: M) -> impl Iterator<Item = M>
Returns iterator over received messages plus party’s own message
Sourcepub fn into_iter_indexed(self) -> impl Iterator<Item = (PartyIndex, MsgId, M)>
pub fn into_iter_indexed(self) -> impl Iterator<Item = (PartyIndex, MsgId, M)>
Returns iterator over messages with sender indexes
Iterator yields (sender_index, msg_id, message)
Sourcepub fn iter_indexed(&self) -> impl Iterator<Item = (PartyIndex, MsgId, &M)>
pub fn iter_indexed(&self) -> impl Iterator<Item = (PartyIndex, MsgId, &M)>
Returns iterator over messages with sender indexes
Iterator yields (sender_index, msg_id, &message)