use crate::{EntityId, Tick};
use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error("Entity {0:?} not found")]
EntityNotFound(EntityId),
#[error("Timeline is full (max entities: {0})")]
TimelineFull(usize),
#[error("Invalid chronoport target time: {0}")]
InvalidChronoport(Tick),
#[error("Chronoport target {target} exceeds past window limit (minimum: {min_allowed})")]
ChronoportPastWindow {
target: Tick,
min_allowed: Tick,
},
#[error("Chronoport target {target} exceeds future window limit (maximum: {max_allowed})")]
ChronoportFutureWindow {
target: Tick,
max_allowed: Tick,
},
#[error("Entity {0:?} is in invalid state for operation")]
InvalidEntityState(EntityId),
}
pub type Result<T> = std::result::Result<T, Error>;