Trait core_crypto_keystore::entities::UniqueEntity

source ·
pub trait UniqueEntity: EntityBase<ConnectionType = KeystoreDatabaseConnection> {
    const ID: usize = 0usize;

    // Required methods
    fn new(content: Vec<u8>) -> Self;
    fn content(&self) -> &[u8] ;

    // Provided methods
    fn find_unique<'life0, 'async_trait>(
        conn: &'life0 mut Self::ConnectionType,
    ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Self>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
    fn find_all<'life0, 'async_trait>(
        conn: &'life0 mut Self::ConnectionType,
        _params: EntityFindParams,
    ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Vec<Self>>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
    fn find_one<'life0, 'async_trait>(
        conn: &'life0 mut Self::ConnectionType,
    ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Option<Self>>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
    fn count<'life0, 'async_trait>(
        conn: &'life0 mut Self::ConnectionType,
    ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<usize>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
    fn replace<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        transaction: &'life1 TransactionWrapper<'life2>,
    ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<()>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}

Provided Associated Constants§

source

const ID: usize = 0usize

Required Methods§

source

fn new(content: Vec<u8>) -> Self

source

fn content(&self) -> &[u8]

Provided Methods§

source

fn find_unique<'life0, 'async_trait>( conn: &'life0 mut Self::ConnectionType, ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Self>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

source

fn find_all<'life0, 'async_trait>( conn: &'life0 mut Self::ConnectionType, _params: EntityFindParams, ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Vec<Self>>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

source

fn find_one<'life0, 'async_trait>( conn: &'life0 mut Self::ConnectionType, ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Option<Self>>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

source

fn count<'life0, 'async_trait>( conn: &'life0 mut Self::ConnectionType, ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<usize>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

source

fn replace<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, transaction: &'life1 TransactionWrapper<'life2>, ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§