use crate::FrameId;
#[derive(Debug, PartialEq, thiserror::Error)]
pub enum EvictError<F: FrameId> {
#[error("Invalid frame id: {0}")]
InvalidFrameId(F),
#[error("Trying to remove pinned frame: {0}")]
PinnedFrameRemoval(F),
#[error("Frame replacer is full")]
FrameReplacerFull,
#[error("Invalid timestamp")]
InvalidTimestamp,
#[error("No free frames available (nor in free list nor in frame replacer)")]
NoFramesAvailable,
#[error("Sequence generator exhausted")]
SequenceExhausted,
}
pub type EvictResult<T, F> = Result<T, EvictError<F>>;