sylvia_iot_broker::models::network_route

Trait NetworkRouteCache

Source
pub trait NetworkRouteCache: 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,
        network_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<NetworkRouteCacheUlData>, 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,
        network_id: &'life1 str,
        value: Option<&'life2 NetworkRouteCacheUlData>,
    ) -> 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,
        network_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;
}
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 network routes.

Source

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

To get network route for the uplink data.

Source

fn set_uldata<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, network_id: &'life1 str, value: Option<&'life2 NetworkRouteCacheUlData>, ) -> 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 network route for the uplink data.

Source

fn del_uldata<'life0, 'life1, 'async_trait>( &'life0 self, network_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 network route for the uplink data.

Implementors§