s2n_quic_core/transmission/
mode.rs1#[cfg(any(test, feature = "generator"))]
5use bolero_generator::prelude::*;
6
7#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
8#[cfg_attr(any(test, feature = "generator"), derive(TypeGenerator))]
9pub enum Mode {
10 LossRecoveryProbing,
12 MtuProbing,
14 PathValidationOnly,
16 Normal,
18}
19
20impl Mode {
21 pub fn is_loss_recovery_probing(&self) -> bool {
23 matches!(self, Mode::LossRecoveryProbing)
24 }
25
26 pub fn is_mtu_probing(&self) -> bool {
28 matches!(self, Mode::MtuProbing)
29 }
30
31 pub fn is_path_validation(&self) -> bool {
33 matches!(self, Mode::PathValidationOnly)
34 }
35
36 pub fn is_normal(&self) -> bool {
38 matches!(self, Mode::Normal)
39 }
40}