pub struct Database(/* private fields */);Implementations§
source§impl Database
impl Database
pub fn new(client: Client) -> Self
pub fn clone(&self) -> Self
pub fn connect(&self) -> Result<()>
pub fn connected(&self) -> bool
pub fn disconnect(&self) -> bool
pub fn find( &self, entity_type: &str, field: &Vec<String>, predicate: fn(_: &HashMap<String, DatabaseField>) -> bool, ) -> Result<Vec<DatabaseEntity>>
pub fn get_entity(&self, entity_id: &str) -> Result<DatabaseEntity>
pub fn get_entities(&self, entity_type: &str) -> Result<Vec<DatabaseEntity>>
pub fn read(&self, requests: &Vec<DatabaseField>) -> Result<()>
pub fn write(&self, requests: &Vec<DatabaseField>) -> Result<()>
pub fn clear_notifications(&self)
pub fn register_notification( &self, config: &NotificationConfig, ) -> Result<Receiver<DatabaseNotification>>
pub fn unregister_notification(&self, token: &NotificationToken) -> Result<()>
pub fn process_notifications(&self) -> Result<()>
Auto Trait Implementations§
impl Freeze for Database
impl !RefUnwindSafe for Database
impl !Send for Database
impl !Sync for Database
impl Unpin for Database
impl !UnwindSafe for Database
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