(&self, collection: &str)
| 39 | } |
| 40 | |
| 41 | fn next(&self, collection: &str) -> u64 { |
| 42 | let mut seqs = self.sequences.lock().unwrap_or_else(|p| p.into_inner()); |
| 43 | let seq = seqs.entry(collection.to_string()).or_insert(0); |
| 44 | *seq += 1; |
| 45 | *seq |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | /// Origin node's peer ID for CRDT attribution. |