diff --git a/smart-house-web/backend/src/house.rs b/smart-house-web/backend/src/house.rs new file mode 100644 index 0000000..39f542e --- /dev/null +++ b/smart-house-web/backend/src/house.rs @@ -0,0 +1,10 @@ +struct PowerSocket { + power_rate: f32, + on: bool, +} + +impl PowerSocket { + pub fn new(power_rate: f32, on: bool) -> Self { + Self { power_rate, on } + } +} diff --git a/smart-house-web/backend/src/lib.rs b/smart-house-web/backend/src/lib.rs index c010ebd..e0bae3c 100644 --- a/smart-house-web/backend/src/lib.rs +++ b/smart-house-web/backend/src/lib.rs @@ -32,3 +32,5 @@ pub fn init_logger() { mod server; pub use server::run_server; + +mod house;