use crate::shorthands::aliases::*;
use core::ops::Bound;
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq, PartialOrd, Ord)]
pub enum CutMode {
Standard,
Backward,
Included,
Excluded,
}
impl CutMode {
#[must_use]
pub fn for_start<T>(&self, pos: T) -> Bound<T> {
match self {
CutMode::Standard => In(pos),
CutMode::Backward => Ex(pos),
CutMode::Included => In(pos),
CutMode::Excluded => Ex(pos),
}
}
#[must_use]
pub fn for_end<T>(&self, pos: T) -> Bound<T> {
match self {
CutMode::Standard => Ex(pos),
CutMode::Backward => In(pos),
CutMode::Included => In(pos),
CutMode::Excluded => Ex(pos),
}
}
}