1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::path::PathBuf;

use crate::definitions::PlatformEventData;

/// Data of a Keyboard event.
#[derive(Debug, Clone, PartialEq)]
pub struct FileData {
    pub file_path: Option<PathBuf>,
}

impl From<&PlatformEventData> for FileData {
    fn from(val: &PlatformEventData) -> Self {
        val.downcast::<FileData>().cloned().unwrap()
    }
}