Impl From<String> for FileIDType
This commit is contained in:
parent
02da675b3f
commit
445f543159
1 changed files with 11 additions and 0 deletions
|
@ -31,6 +31,17 @@ impl Into<String> for FileIDType {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<String> for FileIDType {
|
||||||
|
|
||||||
|
fn from(s: String) -> FileIDType {
|
||||||
|
match &s[..] {
|
||||||
|
"UUID" => FileIDType::UUID,
|
||||||
|
_ => FileIDType::NONE,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct FileID {
|
pub struct FileID {
|
||||||
id: Option<String>,
|
id: Option<String>,
|
||||||
|
|
Loading…
Reference in a new issue