Trait houseflow_db::Database[][src]

pub trait Database: Send + Sync {
Show methods fn add_structure<'life0, 'life1, 'async_trait>(
        &'life0 self,
        structure: &'life1 Structure
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn add_room<'life0, 'life1, 'async_trait>(
        &'life0 self,
        room: &'life1 Room
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn add_device<'life0, 'life1, 'async_trait>(
        &'life0 self,
        device: &'life1 Device
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn add_user_structure<'life0, 'life1, 'async_trait>(
        &'life0 self,
        user_structure: &'life1 UserStructure
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn add_user<'life0, 'life1, 'async_trait>(
        &'life0 self,
        user: &'life1 User
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn get_device<'life0, 'life1, 'async_trait>(
        &'life0 self,
        device_id: &'life1 DeviceID
    ) -> Pin<Box<dyn Future<Output = Result<Option<Device>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn get_user_devices<'life0, 'life1, 'async_trait>(
        &'life0 self,
        user_id: &'life1 UserID
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Device>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn get_user<'life0, 'life1, 'async_trait>(
        &'life0 self,
        user_id: &'life1 UserID
    ) -> Pin<Box<dyn Future<Output = Result<Option<User>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn get_user_by_email<'life0, 'life1, 'async_trait>(
        &'life0 self,
        email: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Option<User>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn check_user_device_access<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        user_id: &'life1 UserID,
        device_id: &'life2 DeviceID
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
fn check_user_device_manager_access<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        user_id: &'life1 UserID,
        device_id: &'life2 DeviceID
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
fn check_user_admin<'life0, 'life1, 'async_trait>(
        &'life0 self,
        user_id: &'life1 UserID
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn delete_user<'life0, 'life1, 'async_trait>(
        &'life0 self,
        user_id: &'life1 UserID
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
}

Required methods

Implementors