From ac84f0db709f17013897f1133d0a478ccf0f2657 Mon Sep 17 00:00:00 2001 From: Raine Date: Thu, 4 Jan 2024 20:13:14 +0100 Subject: [PATCH] fix: forgot to add state code :p --- domo_lib/src/state/mod.rs | 18 ++++++++++++++++++ domo_lib/src/state/state_properties.rs | 4 ++++ 2 files changed, 22 insertions(+) create mode 100644 domo_lib/src/state/mod.rs create mode 100644 domo_lib/src/state/state_properties.rs diff --git a/domo_lib/src/state/mod.rs b/domo_lib/src/state/mod.rs new file mode 100644 index 0000000..c0acc3f --- /dev/null +++ b/domo_lib/src/state/mod.rs @@ -0,0 +1,18 @@ +pub mod state_properties; +pub struct State { + pub state_properties: Vec +} + +impl State { + pub fn new() -> State { + State { state_properties: vec![] } + } +} + +pub trait GetState { + fn get_state(&self) -> State; +} + +pub trait ApplyState { + fn apply_state(&mut self, state: State); +} \ No newline at end of file diff --git a/domo_lib/src/state/state_properties.rs b/domo_lib/src/state/state_properties.rs new file mode 100644 index 0000000..4f4281d --- /dev/null +++ b/domo_lib/src/state/state_properties.rs @@ -0,0 +1,4 @@ +use domo_proto::identifier::Identifier; +use crate::node::property::Property; + +pub struct StateProperties(pub Identifier, pub Property); \ No newline at end of file