fix: forgot to add state code :p
This commit is contained in:
parent
f17bd20516
commit
ac84f0db70
2 changed files with 22 additions and 0 deletions
18
domo_lib/src/state/mod.rs
Normal file
18
domo_lib/src/state/mod.rs
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
pub mod state_properties;
|
||||||
|
pub struct State {
|
||||||
|
pub state_properties: Vec<state_properties::StateProperties>
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
4
domo_lib/src/state/state_properties.rs
Normal file
4
domo_lib/src/state/state_properties.rs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
use domo_proto::identifier::Identifier;
|
||||||
|
use crate::node::property::Property;
|
||||||
|
|
||||||
|
pub struct StateProperties(pub Identifier, pub Property);
|
Loading…
Reference in a new issue