va-ts 0.0.4

MPEG-TS implementation for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::fmt;

#[derive(Debug)]
pub struct ISO639([char; 3]);

impl ISO639 {
    pub fn must_from_bytes_3(b: &[u8]) -> ISO639 {
        ISO639([char::from(b[0]), char::from(b[1]), char::from(b[2])])
    }
}

impl fmt::Display for ISO639 {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "{}{}{}", self.0[0], self.0[1], self.0[2])
    }
}