#[cfg(any(test, feature = "generator"))]
use bolero_generator::prelude::*;
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(any(test, feature = "generator"), derive(TypeGenerator))]
pub enum Mode {
LossRecoveryProbing,
MtuProbing,
PathValidationOnly,
Normal,
}
impl Mode {
pub fn is_loss_recovery_probing(&self) -> bool {
matches!(self, Mode::LossRecoveryProbing)
}
pub fn is_mtu_probing(&self) -> bool {
matches!(self, Mode::MtuProbing)
}
pub fn is_path_validation(&self) -> bool {
matches!(self, Mode::PathValidationOnly)
}
pub fn is_normal(&self) -> bool {
matches!(self, Mode::Normal)
}
}