summaryrefslogtreecommitdiff
path: root/src/item.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/item.rs')
-rw-r--r--src/item.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/item.rs b/src/item.rs
new file mode 100644
index 0000000..63e7b01
--- /dev/null
+++ b/src/item.rs
@@ -0,0 +1,14 @@
+#[derive(Serialize, Deserialize, Debug, Clone)]
+pub struct Item {
+ name : String,
+ size : usize,
+}
+
+impl Item {
+ pub fn new(name : &str, size : usize) -> Item {
+ Item {
+ name : String::from(name),
+ size : size,
+ }
+ }
+}