1use std::fmt;
2
3use uuid::Uuid;
4
5#[derive(Clone, Copy, PartialEq, Eq, Hash)]
7pub struct TaskId(Uuid);
8
9impl TaskId {
10 pub(crate) fn new_v4() -> Self {
11 Self(Uuid::new_v4())
12 }
13}
14
15impl fmt::Debug for TaskId {
16 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
17 fmt::Debug::fmt(&self.0, f)
18 }
19}
20
21#[derive(Clone, Copy, PartialEq, Eq, Hash)]
23pub struct GlobalProgressListenerId(Uuid);
24
25impl GlobalProgressListenerId {
26 pub(crate) fn new_v4() -> Self {
27 Self(Uuid::new_v4())
28 }
29}
30
31impl fmt::Debug for GlobalProgressListenerId {
32 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
33 fmt::Debug::fmt(&self.0, f)
34 }
35}