use crate::Timeline;
#[derive(Debug, Clone, PartialEq)]
pub struct StateTransition<S>
where
S: Copy + Eq,
{
from: S,
to: S,
timeline: Timeline,
}
impl<S> StateTransition<S>
where
S: Copy + Eq,
{
#[must_use]
pub const fn new(from: S, to: S, timeline: Timeline) -> Self {
Self { from, to, timeline }
}
#[must_use]
pub const fn from(&self) -> S {
self.from
}
#[must_use]
pub const fn to(&self) -> S {
self.to
}
#[must_use]
pub const fn timeline(&self) -> &Timeline {
&self.timeline
}
}