Moved client responses to mutex.
This commit is contained in:
17
src/utils.rs
Normal file
17
src/utils.rs
Normal file
@ -0,0 +1,17 @@
|
||||
use uuid::Uuid;
|
||||
|
||||
pub struct GenID;
|
||||
|
||||
impl GenID {
|
||||
pub fn new() -> Self {
|
||||
GenID {}
|
||||
}
|
||||
}
|
||||
|
||||
impl Iterator for GenID {
|
||||
type Item = Uuid;
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
Some(Uuid::new_v4())
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user