Trait atuin_server::database::Database[][src]

pub trait Database {
    #[must_use]
    fn get_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        token: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_session_user<'life0, 'life1, 'async_trait>(
        &'life0 self,
        token: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<User>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn add_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session: &'life1 NewSession<'_>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_user<'life0, 'life1, 'async_trait>(
        &'life0 self,
        username: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<User>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_user_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        u: &'life1 User
    ) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn add_user<'life0, 'life1, 'async_trait>(
        &'life0 self,
        user: &'life1 NewUser<'_>
    ) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn count_history<'life0, 'life1, 'async_trait>(
        &'life0 self,
        user: &'life1 User
    ) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn list_history<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        user: &'life1 User,
        created_since: NaiveDateTime,
        since: NaiveDateTime,
        host: &'life2 str
    ) -> Pin<Box<dyn Future<Output = Result<Vec<History>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn add_history<'life0, 'life1, 'async_trait>(
        &'life0 self,
        history: &'life1 [NewHistory<'_>]
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

Required methods

#[must_use]
fn get_session<'life0, 'life1, 'async_trait>(
    &'life0 self,
    token: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]
fn get_session_user<'life0, 'life1, 'async_trait>(
    &'life0 self,
    token: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<User>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]
fn add_session<'life0, 'life1, 'async_trait>(
    &'life0 self,
    session: &'life1 NewSession<'_>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]
fn get_user<'life0, 'life1, 'async_trait>(
    &'life0 self,
    username: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<User>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]
fn get_user_session<'life0, 'life1, 'async_trait>(
    &'life0 self,
    u: &'life1 User
) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]
fn add_user<'life0, 'life1, 'async_trait>(
    &'life0 self,
    user: &'life1 NewUser<'_>
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]
fn count_history<'life0, 'life1, 'async_trait>(
    &'life0 self,
    user: &'life1 User
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]
fn list_history<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    user: &'life1 User,
    created_since: NaiveDateTime,
    since: NaiveDateTime,
    host: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<Vec<History>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

#[must_use]
fn add_history<'life0, 'life1, 'async_trait>(
    &'life0 self,
    history: &'life1 [NewHistory<'_>]
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...

Implementors

impl Database for Postgres[src]

fn get_session<'life0, 'life1, 'async_trait>(
    &'life0 self,
    token: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

fn get_user<'life0, 'life1, 'async_trait>(
    &'life0 self,
    username: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<User>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

fn get_session_user<'life0, 'life1, 'async_trait>(
    &'life0 self,
    token: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<User>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

fn count_history<'life0, 'life1, 'async_trait>(
    &'life0 self,
    user: &'life1 User
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

fn list_history<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    user: &'life1 User,
    created_since: NaiveDateTime,
    since: NaiveDateTime,
    host: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<Vec<History>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

fn add_history<'life0, 'life1, 'async_trait>(
    &'life0 self,
    history: &'life1 [NewHistory<'_>]
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

fn add_user<'life0, 'life1, 'async_trait>(
    &'life0 self,
    user: &'life1 NewUser<'_>
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

fn add_session<'life0, 'life1, 'async_trait>(
    &'life0 self,
    session: &'life1 NewSession<'_>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

fn get_user_session<'life0, 'life1, 'async_trait>(
    &'life0 self,
    u: &'life1 User
) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...