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 DataModelwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
PhantomData<(WatchId, Vec<String>)>: Freeze,
impl Move for DataModel
impl RefUnwindSafe for DataModel
impl Send for DataModel
impl Sync for DataModel
impl Unpin for DataModel
impl UnsafeUnpin for DataModelwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
PhantomData<(WatchId, Vec<String>)>: UnsafeUnpin,
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