mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-23 15:51:03 +00:00
22 lines
457 B
Rust
22 lines
457 B
Rust
use crate::Adapter;
|
|
|
|
#[derive(Clone, Copy, Debug)]
|
|
pub struct Unknown {
|
|
pub kgp: bool,
|
|
pub sixel: bool,
|
|
}
|
|
|
|
impl Unknown {
|
|
pub(super) const fn default() -> Self { Self { kgp: false, sixel: false } }
|
|
|
|
pub(super) fn adapters(self) -> &'static [Adapter] {
|
|
use Adapter as A;
|
|
|
|
match (self.kgp, self.sixel) {
|
|
(true, true) => &[A::Sixel, A::KgpOld],
|
|
(true, false) => &[A::KgpOld],
|
|
(false, true) => &[A::Sixel],
|
|
(false, false) => &[],
|
|
}
|
|
}
|
|
}
|