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
use clap::Command;
use self::{
avif::avif, farbfeld::farbfeld, jpeg::jpeg, jpeg_xl::jpeg_xl, mozjpeg::mozjpeg, oxipng::oxipng,
png::png, ppm::ppm, qoi::qoi, webp::webp,
};
mod avif;
mod farbfeld;
mod jpeg;
mod jpeg_xl;
mod mozjpeg;
mod oxipng;
mod png;
mod ppm;
mod qoi;
mod webp;
impl Codecs for Command {
fn codecs(self) -> Self {
self.subcommands([
avif(),
farbfeld(),
jpeg(),
jpeg_xl(),
mozjpeg(),
oxipng(),
png(),
ppm(),
qoi(),
webp(),
])
}
}
pub trait Codecs {
fn codecs(self) -> Self;
}