wip: add loaded and persisted flags with function placeholders
This commit is contained in:
@@ -2,6 +2,8 @@ use crate::*;
|
|||||||
|
|
||||||
#[derive(Debug, Default, PartialEq, Clone)]
|
#[derive(Debug, Default, PartialEq, Clone)]
|
||||||
pub struct O {
|
pub struct O {
|
||||||
|
pub persisted: bool,
|
||||||
|
pub loaded: bool,
|
||||||
pub id: String,
|
pub id: String,
|
||||||
pub class: String,
|
pub class: String,
|
||||||
pub attributes: std::collections::HashMap<String, Attribute>,
|
pub attributes: std::collections::HashMap<String, Attribute>,
|
||||||
@@ -57,4 +59,10 @@ impl O {
|
|||||||
let value = self.value_of(id).unwrap();
|
let value = self.value_of(id).unwrap();
|
||||||
T::from(value.clone())
|
T::from(value.clone())
|
||||||
}
|
}
|
||||||
|
pub fn persist(&self) {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
pub fn load(_id: &str) -> Self {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user