#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use crate::intervals::absolute::{AbsEndBound, AbsStartBound};
use crate::iter::intervals::layered_bounds::state::LayeredBoundsState;
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
pub struct LayeredBoundsStateChangeAtAbsBound {
old_state: LayeredBoundsState,
new_state: LayeredBoundsState,
old_state_end: Option<AbsEndBound>,
new_state_start: Option<AbsStartBound>,
}
impl LayeredBoundsStateChangeAtAbsBound {
#[must_use]
pub fn new(
old_state: LayeredBoundsState,
new_state: LayeredBoundsState,
old_state_end: Option<AbsEndBound>,
new_state_start: Option<AbsStartBound>,
) -> Self {
LayeredBoundsStateChangeAtAbsBound {
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<AbsEndBound> {
self.old_state_end
}
#[must_use]
pub fn new_state_start(&self) -> Option<AbsStartBound> {
self.new_state_start
}
}