pub struct DataModel { /* private fields */ }Expand description
A surface’s data model.
Implementations§
Source§impl DataModel
impl DataModel
Sourcepub fn get(&self, path: &str) -> Result<Option<&Value>, DataError>
pub fn get(&self, path: &str) -> Result<Option<&Value>, DataError>
The value at path, or None when it is absent or null.
Sourcepub fn watch(&mut self, path: &str) -> Result<WatchId, DataError>
pub fn watch(&mut self, path: &str) -> Result<WatchId, DataError>
Watch path: DataModel::set and DataModel::delete report this
id when the value there changes.
Trait Implementations§
impl StructuralPartialEq for DataModel
Auto Trait Implementations§
impl Forget for DataModel
impl Freeze for DataModel
impl Move for DataModel
impl RefUnwindSafe for DataModel
impl Send for DataModel
impl Sync for DataModel
impl Unpin for DataModel
impl UnsafeUnpin for DataModel
impl UnwindSafe for DataModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more