dvb-si 17.1.0

ETSI EN 300 468 DVB Service Information parser + builder. MPEG-2 PSI included.
Documentation
1
2
3
4
5
6
7
8
9
10
//! The units the `for_profile` presets (#4766) are written in.

/// `n` as a [`core::num::NonZeroUsize`], or the smallest one for `0`, so a
/// preset constant can be written as a plain count.
pub(crate) const fn non_zero(n: usize) -> core::num::NonZeroUsize {
    match core::num::NonZeroUsize::new(n) {
        Some(n) => n,
        None => core::num::NonZeroUsize::MIN,
    }
}