Impl Into<String> for FileIDType

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

View file

@ -18,6 +18,19 @@ pub enum FileIDType {
UUID,
}
impl Into<String> for FileIDType {
fn into(self) -> String {
let s = match self {
FileIDType::UUID => "UUID",
FileIDType::NONE => "",
};
String::from(s)
}
}
#[derive(Clone)]
pub struct FileID {
id: Option<String>,