#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Deserialize, Serialize)]
#[serde(deny_unknown_fields, default)]
pub struct CoalescePair
{
pub microseconds: Option<NonZeroU32>,
pub maximum_frames: Option<NonZeroU32>,
}
impl Default for CoalescePair
{
#[inline(always)]
fn default() -> Self
{
CoalescePair::Disabled
}
}
impl CoalescePair
{
pub const DisabledWhereMaximumFramesUnsupported: Self = Self
{
microseconds: None,
maximum_frames: None
};
pub const Disabled: Self = Self
{
microseconds: None,
maximum_frames: Some(new_non_zero_u32(1)),
};
}