[][src]Trait aries_askar::Backend

pub trait Backend: Send + Sync {
    type Session: QueryBackend;
    pub fn create_profile(
        &self,
        name: Option<String>
    ) -> BoxFuture<'_, Result<String, Error>>;
pub fn get_profile_name(&self) -> &str;
pub fn remove_profile(
        &self,
        name: String
    ) -> BoxFuture<'_, Result<bool, Error>>;
pub fn scan(
        &self,
        profile: Option<String>,
        kind: EntryKind,
        category: String,
        tag_filter: Option<TagFilter>,
        offset: Option<i64>,
        limit: Option<i64>
    ) -> BoxFuture<'_, Result<Scan<'static, Entry>, Error>>;
pub fn session(
        &self,
        profile: Option<String>,
        transaction: bool
    ) -> Result<Self::Session, Error>;
pub fn rekey_backend(
        &mut self,
        method: WrapKeyMethod,
        key: PassKey<'_>
    ) -> BoxFuture<'_, Result<(), Error>>;
pub fn close(&self) -> BoxFuture<'_, Result<(), Error>>; }

Represents a generic backend implementation

Associated Types

Loading content...

Required methods

pub fn create_profile(
    &self,
    name: Option<String>
) -> BoxFuture<'_, Result<String, Error>>
[src]

pub fn get_profile_name(&self) -> &str[src]

pub fn remove_profile(&self, name: String) -> BoxFuture<'_, Result<bool, Error>>[src]

pub fn scan(
    &self,
    profile: Option<String>,
    kind: EntryKind,
    category: String,
    tag_filter: Option<TagFilter>,
    offset: Option<i64>,
    limit: Option<i64>
) -> BoxFuture<'_, Result<Scan<'static, Entry>, Error>>
[src]

pub fn session(
    &self,
    profile: Option<String>,
    transaction: bool
) -> Result<Self::Session, Error>
[src]

pub fn rekey_backend(
    &mut self,
    method: WrapKeyMethod,
    key: PassKey<'_>
) -> BoxFuture<'_, Result<(), Error>>
[src]

pub fn close(&self) -> BoxFuture<'_, Result<(), Error>>[src]

Loading content...

Implementors

impl Backend for AnyBackend[src]

This is supported on crate feature any only.

type Session = AnyQueryBackend

impl Backend for PostgresStore[src]

This is supported on crate feature postgres only.

type Session = DbSession<Postgres>

impl Backend for SqliteStore[src]

This is supported on crate feature sqlite only.

type Session = DbSession<Sqlite>

Loading content...