1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
use core::{
cmp::PartialEq,
fmt::{self, Debug},
};
//
#[derive(Clone)]
pub struct HandlerData<T>(pub T)
where
T: Clone;
impl<T> Debug for HandlerData<T>
where
T: Clone + Debug,
{
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("HandlerData").field(&self.0).finish()
}
}
impl<T> PartialEq for HandlerData<T>
where
T: Clone + PartialEq,
{
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
