Trait Host

Source
pub trait Host: Send {
    // Required methods
    fn check_rate<'life0, 'async_trait>(
        &'life0 mut self,
        rc: String,
        entry: String,
        delta: u32,
        window: u32,
        limit: u32,
        pb: String,
        ttl: u32,
    ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn ratecounter_increment<'life0, 'async_trait>(
        &'life0 mut self,
        rc: String,
        entry: String,
        delta: u32,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn ratecounter_lookup_rate<'life0, 'async_trait>(
        &'life0 mut self,
        rc: String,
        entry: String,
        window: u32,
    ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn ratecounter_lookup_count<'life0, 'async_trait>(
        &'life0 mut self,
        rc: String,
        entry: String,
        duration: u32,
    ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn penaltybox_add<'life0, 'async_trait>(
        &'life0 mut self,
        pb: String,
        entry: String,
        ttl: u32,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn penaltybox_has<'life0, 'async_trait>(
        &'life0 mut self,
        pb: String,
        entry: String,
    ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn check_rate<'life0, 'async_trait>( &'life0 mut self, rc: String, entry: String, delta: u32, window: u32, limit: u32, pb: String, ttl: u32, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ratecounter_increment<'life0, 'async_trait>( &'life0 mut self, rc: String, entry: String, delta: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ratecounter_lookup_rate<'life0, 'async_trait>( &'life0 mut self, rc: String, entry: String, window: u32, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ratecounter_lookup_count<'life0, 'async_trait>( &'life0 mut self, rc: String, entry: String, duration: u32, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn penaltybox_add<'life0, 'async_trait>( &'life0 mut self, pb: String, entry: String, ttl: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn penaltybox_has<'life0, 'async_trait>( &'life0 mut self, pb: String, entry: String, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

Source§

impl<_T: Host + ?Sized + Send> Host for &mut _T

Source§

fn check_rate<'life0, 'async_trait>( &'life0 mut self, rc: String, entry: String, delta: u32, window: u32, limit: u32, pb: String, ttl: u32, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn ratecounter_increment<'life0, 'async_trait>( &'life0 mut self, rc: String, entry: String, delta: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn ratecounter_lookup_rate<'life0, 'async_trait>( &'life0 mut self, rc: String, entry: String, window: u32, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn ratecounter_lookup_count<'life0, 'async_trait>( &'life0 mut self, rc: String, entry: String, duration: u32, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn penaltybox_add<'life0, 'async_trait>( &'life0 mut self, pb: String, entry: String, ttl: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn penaltybox_has<'life0, 'async_trait>( &'life0 mut self, pb: String, entry: String, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§