Impl Into<String> for FileIDType
This commit is contained in:
parent
8dc9cd9b69
commit
02da675b3f
1 changed files with 13 additions and 0 deletions
|
@ -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>,
|
||||
|
|
Loading…
Reference in a new issue