Struct distrand::Exchange[][src]

pub struct Exchange<T, I, M> where
    M: Mac
{ /* fields omitted */ }

Collects Commit instances from participants.

Methods

impl<T, I, M> Exchange<T, I, M> where
    M: Mac,
    I: Eq + Hash
[src]

Create a new instance.

Insert a Commit that came from a participant identified with id.

id is a unique identifier for a participant. An example might be a std::net::SocketAddr for participants using sockets to communicate.

Indicate that all expected Commits have been received.

Auto Trait Implementations

impl<T, I, M> Send for Exchange<T, I, M> where
    I: Send,
    T: Send,
    <M as Mac>::OutputSize: ArrayLength<u8>, 

impl<T, I, M> Sync for Exchange<T, I, M> where
    I: Sync,
    T: Sync,
    <M as Mac>::OutputSize: ArrayLength<u8>,