use std::fmt;
use uuid::Uuid;
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
pub struct TaskId(Uuid);
impl TaskId {
pub(crate) fn new_v4() -> Self {
Self(Uuid::new_v4())
}
}
impl fmt::Debug for TaskId {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Debug::fmt(&self.0, f)
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
pub struct GlobalProgressListenerId(Uuid);
impl GlobalProgressListenerId {
pub(crate) fn new_v4() -> Self {
Self(Uuid::new_v4())
}
}
impl fmt::Debug for GlobalProgressListenerId {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Debug::fmt(&self.0, f)
}
}