Impl From<String> for FileIDType

This commit is contained in:
Matthias Beyer 2015-12-03 17:33:16 +01:00
parent 02da675b3f
commit 445f543159

View file

@ -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)]
pub struct FileID {
id: Option<String>,