use std::marker::PhantomData;
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ActionHandle(pub(super) usize);
impl ActionHandle {
pub const fn slot(self) -> usize {
self.0
}
}
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct TypedActionHandle<I, O> {
pub(super) raw: ActionHandle,
pub(super) marker: PhantomData<fn(I) -> O>,
}
impl<I, O> Copy for TypedActionHandle<I, O> {}
impl<I, O> Clone for TypedActionHandle<I, O> {
fn clone(&self) -> Self {
*self
}
}
impl<I, O> TypedActionHandle<I, O> {
pub const fn raw(self) -> ActionHandle {
self.raw
}
}