Trait HashModel

Source
pub trait HashModel:
    RedisModel
    + RedisSearchModel
    + ToRedisArgs
    + FromRedisValue {
    // Provided methods
    fn redis_prefix() -> &'static str { ... }
    fn redissearch_schema() -> &'static str { ... }
    fn save<'life0, 'life1, 'async_trait, C>(
        &'life0 mut self,
        conn: &'life1 mut C,
    ) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
       where C: ConnectionLike + Send + 'async_trait,
             Self: Send + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn all_pks<'life0, 'async_trait, C>(
        conn: &'life0 mut C,
    ) -> Pin<Box<dyn Future<Output = RedisResult<AsyncIter<'_, String>>> + Send + 'async_trait>>
       where C: 'async_trait + ConnectionLike + Send,
             Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
    fn get<'life0, 'async_trait, C, S>(
        pk: S,
        conn: &'life0 mut C,
    ) -> Pin<Box<dyn Future<Output = RedisResult<Self>> + Send + 'async_trait>>
       where S: AsRef<str> + Send + 'async_trait,
             C: ConnectionLike + Send + 'async_trait,
             Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
    fn delete<'life0, 'async_trait, S, C>(
        pk: S,
        conn: &'life0 mut C,
    ) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
       where S: AsRef<str> + Send + 'async_trait,
             C: ConnectionLike + Send + 'async_trait,
             Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
    fn expire<'life0, 'life1, 'async_trait, C>(
        &'life0 self,
        secs: usize,
        conn: &'life1 mut C,
    ) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
       where C: ConnectionLike + Send + 'async_trait,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Hash Object Model

Provided Methods§

Source

fn redis_prefix() -> &'static str

Get Redis key to be used in storing HashModel object. This should by default that HashModel name in lowercase.

Source

fn redissearch_schema() -> &'static str

Redis search schema

Source

fn save<'life0, 'life1, 'async_trait, C>( &'life0 mut self, conn: &'life1 mut C, ) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
where C: ConnectionLike + Send + 'async_trait, Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Save Self into redis database

Source

fn all_pks<'life0, 'async_trait, C>( conn: &'life0 mut C, ) -> Pin<Box<dyn Future<Output = RedisResult<AsyncIter<'_, String>>> + Send + 'async_trait>>
where C: 'async_trait + ConnectionLike + Send, Self: Send + 'async_trait, 'life0: 'async_trait,

Get a list of all primary keys for current type

Source

fn get<'life0, 'async_trait, C, S>( pk: S, conn: &'life0 mut C, ) -> Pin<Box<dyn Future<Output = RedisResult<Self>> + Send + 'async_trait>>
where S: AsRef<str> + Send + 'async_trait, C: ConnectionLike + Send + 'async_trait, Self: Send + 'async_trait, 'life0: 'async_trait,

Get a list of all primary keys for current type

Source

fn delete<'life0, 'async_trait, S, C>( pk: S, conn: &'life0 mut C, ) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
where S: AsRef<str> + Send + 'async_trait, C: ConnectionLike + Send + 'async_trait, Self: Send + 'async_trait, 'life0: 'async_trait,

Delete by given pk

Source

fn expire<'life0, 'life1, 'async_trait, C>( &'life0 self, secs: usize, conn: &'life1 mut C, ) -> Pin<Box<dyn Future<Output = RedisResult<()>> + Send + 'async_trait>>
where C: ConnectionLike + Send + 'async_trait, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Expire Self at given duration

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§