sylvia_iot_broker::models::device_route

Trait DeviceRouteCache

Source
pub trait DeviceRouteCache: Sync {
    // Required methods
    fn clear<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_uldata<'life0, 'life1, 'async_trait>(
        &'life0 self,
        device_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<DeviceRouteCacheUlData>, Box<dyn StdError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn set_uldata<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        device_id: &'life1 str,
        value: Option<&'life2 DeviceRouteCacheUlData>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn del_uldata<'life0, 'life1, 'async_trait>(
        &'life0 self,
        device_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_dldata<'life0, 'life1, 'async_trait>(
        &'life0 self,
        cond: &'life1 GetCacheQueryCond<'_>,
    ) -> Pin<Box<dyn Future<Output = Result<Option<DeviceRouteCacheDlData>, Box<dyn StdError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn set_dldata<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        cond: &'life1 GetCacheQueryCond<'_>,
        value: Option<&'life2 DeviceRouteCacheDlData>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn del_dldata<'life0, 'life1, 'async_trait>(
        &'life0 self,
        cond: &'life1 DelCacheQueryCond<'_>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_dldata_pub<'life0, 'life1, 'async_trait>(
        &'life0 self,
        cond: &'life1 GetCachePubQueryCond<'_>,
    ) -> Pin<Box<dyn Future<Output = Result<Option<DeviceRouteCacheDlData>, Box<dyn StdError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn set_dldata_pub<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        cond: &'life1 GetCachePubQueryCond<'_>,
        value: Option<&'life2 DeviceRouteCacheDlData>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn del_dldata_pub<'life0, 'life1, 'async_trait>(
        &'life0 self,
        cond: &'life1 DelCachePubQueryCond<'_>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Cache operations.

Required Methods§

Source

fn clear<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

To clear all device routes.

Source

fn get_uldata<'life0, 'life1, 'async_trait>( &'life0 self, device_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<DeviceRouteCacheUlData>, Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

To get device route for the uplink data.

Source

fn set_uldata<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, device_id: &'life1 str, value: Option<&'life2 DeviceRouteCacheUlData>, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

To set device route for the uplink data.

Source

fn del_uldata<'life0, 'life1, 'async_trait>( &'life0 self, device_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

To delete device route for the uplink data.

Source

fn get_dldata<'life0, 'life1, 'async_trait>( &'life0 self, cond: &'life1 GetCacheQueryCond<'_>, ) -> Pin<Box<dyn Future<Output = Result<Option<DeviceRouteCacheDlData>, Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

To get device route for the downlink data.

Source

fn set_dldata<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, cond: &'life1 GetCacheQueryCond<'_>, value: Option<&'life2 DeviceRouteCacheDlData>, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

To set device route for the downlink data.

Source

fn del_dldata<'life0, 'life1, 'async_trait>( &'life0 self, cond: &'life1 DelCacheQueryCond<'_>, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

To delete device route for the downlink data.

Source

fn get_dldata_pub<'life0, 'life1, 'async_trait>( &'life0 self, cond: &'life1 GetCachePubQueryCond<'_>, ) -> Pin<Box<dyn Future<Output = Result<Option<DeviceRouteCacheDlData>, Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

To get device route for the (public network) downlink data.

Source

fn set_dldata_pub<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, cond: &'life1 GetCachePubQueryCond<'_>, value: Option<&'life2 DeviceRouteCacheDlData>, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

To set device route for the (public network) downlink data.

Source

fn del_dldata_pub<'life0, 'life1, 'async_trait>( &'life0 self, cond: &'life1 DelCachePubQueryCond<'_>, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

To delete device route for the (public network) downlink data.

Implementors§