aboutsummaryrefslogtreecommitdiff
path: root/src/config/netspeed.rs
diff options
context:
space:
mode:
authorMustafa Salih <37256744+MustafaSalih1993@users.noreply.github.com>2021-01-26 02:44:13 +0300
committerGitHub <noreply@github.com>2021-01-26 02:44:13 +0300
commit6c0dfddead48e603826fbf637fe51f02e8320223 (patch)
tree3ac7796df10cd487598e4c256c96a84ab08a39fd /src/config/netspeed.rs
parent9525a1075199d5fd202d1744dc502ff5a766aa99 (diff)
Reads network bandwith (#39)
* updated crate version * updated crate version * rsblocks now reads netspeed per second
Diffstat (limited to 'src/config/netspeed.rs')
-rw-r--r--src/config/netspeed.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/config/netspeed.rs b/src/config/netspeed.rs
new file mode 100644
index 0000000..3e6a536
--- /dev/null
+++ b/src/config/netspeed.rs
@@ -0,0 +1,21 @@
+use serde::{Deserialize, Serialize};
+use std::default::Default;
+
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+pub struct NetSpeed {
+ pub transmit_icon: String,
+ pub recieve_icon: String,
+ pub interface: String,
+ pub enabled: bool,
+}
+
+impl Default for NetSpeed {
+ fn default() -> Self {
+ NetSpeed {
+ transmit_icon: String::from(""),
+ recieve_icon: String::from(""),
+ interface: String::from("wlan0"),
+ enabled: false,
+ }
+ }
+}