1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#![allow(dead_code)]
use std::fs::File;
mod ber_tlv_parser;
mod traits;
pub enum RustTlvParser {
BERTLV,
DER,
ASN1,
MKV,
JPEG,
HEIC,
MP4,
AVI,
ThreeGpp,
ELF,
JavaCardCap,
RMV,
TIFF,
PDF,
BMP,
GIF,
FLV,
}
impl RustTlvParser {
pub fn new(parser: RustTlvParser, file: File) {
match parser {
RustTlvParser::BERTLV => todo!(),
RustTlvParser::DER => todo!(),
RustTlvParser::ASN1 => todo!(),
RustTlvParser::MKV => todo!(),
RustTlvParser::JPEG => todo!(),
RustTlvParser::HEIC => todo!(),
RustTlvParser::MP4 => todo!(),
RustTlvParser::AVI => todo!(),
RustTlvParser::ThreeGpp => todo!(),
RustTlvParser::ELF => todo!(),
RustTlvParser::JavaCardCap => todo!(),
RustTlvParser::RMV => todo!(),
RustTlvParser::TIFF => todo!(),
RustTlvParser::PDF => todo!(),
RustTlvParser::BMP => todo!(),
RustTlvParser::GIF => todo!(),
RustTlvParser::FLV => todo!(),
}
}
}
#[cfg(test)]
mod tests {
use std::fs::File;
#[test]
fn it_works() {
let _file = File::open("/home/mukesh/Work/Test/test.mkv".to_string()).unwrap();
}
}