rfc9218_priority/
rfc9218-priority.rs1use cloudflare_soos as soos;
2use std::env;
3use std::fs;
4use std::process;
5
6fn usage() -> ! {
7 eprintln!("usage: {} image.jpg", env::args().next().as_deref().unwrap_or("rfc9218-priority"));
8 process::exit(1)
9}
10
11fn main() {
12 let mut args = env::args().skip(1);
13 let input_path = args.next().unwrap_or_else(|| usage());
14 let input_file = fs::read(input_path).expect("The specified input file could not be opened");
15
16 let scans = soos::Scans::from_file(&input_file).expect("Scan failed");
17
18 println!("{scans:#?}");
19 println!("priority: {}", scans.rfc9218_priority_change_headers().unwrap());
20}