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]
impl<T, I, M> Exchange<T, I, M> where
M: Mac,
I: Eq + Hash,
pub fn new() -> Self
[src]
pub fn new() -> Self
Create a new instance.
pub fn insert(&mut self, id: I, commit: Commit<T, M>) -> Result<()>
[src]
pub fn insert(&mut self, id: I, commit: Commit<T, M>) -> Result<()>
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.
pub fn reveal(self) -> Result<Reveal<T, I, M>>
[src]
pub fn reveal(self) -> Result<Reveal<T, I, M>>
Indicate that all expected Commit
s have been received.