diff options
Diffstat (limited to 'common/src')
-rw-r--r-- | common/src/api.rs | 15 | ||||
-rw-r--r-- | common/src/lib.rs | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/common/src/api.rs b/common/src/api.rs new file mode 100644 index 0000000..c01053c --- /dev/null +++ b/common/src/api.rs @@ -0,0 +1,15 @@ +use serde::{Deserialize, Serialize}; +use crate::{DirectoryInfo, ItemInfo}; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub enum ApiNode { + Directory { + identifier: String, + info: DirectoryInfo, + children: Vec<String>, + }, + Item { + identifier: String, + info: ItemInfo, + }, +} diff --git a/common/src/lib.rs b/common/src/lib.rs index 28ce5a8..080e061 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -1,4 +1,5 @@ pub mod r#impl; +pub mod api; use bincode::{Decode, Encode}; use serde::{Deserialize, Serialize}; |