1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
use uuid::Uuid; #[derive(Debug, Clone, Default)] pub struct ConnectionHandle { pub uuid: Uuid, } impl ConnectionHandle { pub fn new() -> ConnectionHandle { ConnectionHandle { uuid: Uuid::new_v4(), } } pub fn id(&self) -> Uuid { self.uuid } }