97018031c1
Sort specs are of the form `KEY:ORDER`, and allow sorting files in a torrent by multiple criteria. Multiple sort specs can be passed with `--sort-by` upon torrent creation. type: added
15 lines
257 B
Rust
15 lines
257 B
Rust
use crate::common::*;
|
|
|
|
#[derive(Clone, Copy, Debug, PartialEq, IntoStaticStr, EnumString)]
|
|
#[strum(serialize_all = "kebab-case")]
|
|
pub(crate) enum SortKey {
|
|
Path,
|
|
Size,
|
|
}
|
|
|
|
impl SortKey {
|
|
pub(crate) fn name(self) -> &'static str {
|
|
self.into()
|
|
}
|
|
}
|