#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use crate::intervals::relative::{RelEndBound, RelStartBound};
use crate::iter::intervals::layered_bounds::state::LayeredBoundsState;
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
pub struct LayeredBoundsStateChangeAtRelBound {
old_state: LayeredBoundsState,
new_state: LayeredBoundsState,
old_state_end: Option<RelEndBound>,
new_state_start: Option<RelStartBound>,
}
impl LayeredBoundsStateChangeAtRelBound {
#[must_use]
pub fn new(
old_state: LayeredBoundsState,
new_state: LayeredBoundsState,
old_state_end: Option<RelEndBound>,
new_state_start: Option<RelStartBound>,
) -> Self {
LayeredBoundsStateChangeAtRelBound {
old_state,
new_state,
old_state_end,
new_state_start,
}
}
#[must_use]
pub fn old_state(&self) -> LayeredBoundsState {
self.old_state
}
#[must_use]
pub fn new_state(&self) -> LayeredBoundsState {
self.new_state
}
#[must_use]
pub fn old_state_end(&self) -> Option<RelEndBound> {
self.old_state_end
}
#[must_use]
pub fn new_state_start(&self) -> Option<RelStartBound> {
self.new_state_start
}
}