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
use crate::supported::SupportedFilesystems;
#[derive(Clone, Copy, Debug)]
pub enum FilesystemType<'a> {
Auto(&'a SupportedFilesystems),
Manual(&'a str),
Set(&'a [&'a str]),
}
impl<'a> From<&'a SupportedFilesystems> for FilesystemType<'a> {
fn from(s: &'a SupportedFilesystems) -> Self {
FilesystemType::Auto(s)
}
}
impl<'a> From<&'a str> for FilesystemType<'a> {
fn from(s: &'a str) -> Self {
FilesystemType::Manual(s)
}
}
impl<'a> From<&'a [&'a str]> for FilesystemType<'a> {
fn from(s: &'a [&'a str]) -> Self {
FilesystemType::Set(s)
}
}