[−][src]Function threshold::clock::vclock_from_seqs
pub fn vclock_from_seqs<I: IntoIterator<Item = u64>>(iter: I) -> VClock<u64>
Creates a new vector clock from a list of sequences.
u64
are used as actor identifers and:
- the first sequence is mapped to actor number 0
- the last sequence is mapped to actor number #sequences - 1
Examples
use threshold::{clock, *}; let clock = clock::vclock_from_seqs(vec![10, 20]); assert!(clock.is_element(&Dot::new(&0, 10))); assert!(clock.is_element(&Dot::new(&1, 20)));