use crate::depot::array::Index;
pub trait State: Copy {
const RETIRE: bool;
}
#[derive(Clone, Copy, Debug)]
pub struct Vacant;
#[derive(Clone, Copy, Debug)]
pub struct Issued;
#[derive(Clone, Copy, Debug)]
pub struct Target<const N: usize>(pub(in crate::depot) Index<N>);
#[derive(Clone, Copy, Debug)]
pub struct Restore<const N: usize>(pub(in crate::depot) Index<N>);
impl State for Vacant {
const RETIRE: bool = false;
}
impl State for Issued {
const RETIRE: bool = true;
}
impl<const N: usize> State for Target<N> {
const RETIRE: bool = false;
}
impl<const N: usize> State for Restore<N> {
const RETIRE: bool = true;
}