use std::marker::PhantomData;
pub(crate) type Marker<T> = PhantomData<(fn(T) -> T, *const ())>;
pub(crate) type NotSend = PhantomData<*const ()>;
macro_rules! handle_impls {
($name:ident $(<$t:ident>)?) => {
impl$(<$t>)? Clone for $name$(<$t>)? {
fn clone(&self) -> Self {
*self
}
}
impl$(<$t>)? Copy for $name$(<$t>)? {}
impl$(<$t>)? PartialEq for $name$(<$t>)? {
fn eq(&self, other: &Self) -> bool {
self.id == other.id
}
}
impl$(<$t>)? Eq for $name$(<$t>)? {}
impl$(<$t>)? std::hash::Hash for $name$(<$t>)? {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
std::hash::Hash::hash(&self.id, state);
}
}
impl$(<$t>)? std::fmt::Debug for $name$(<$t>)? {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_tuple(stringify!($name)).field(&self.id).finish()
}
}
};
}
pub(crate) use handle_impls;