pub trait EntityDeleteBorrowed<'a>: EntityDatabaseMutation<'a> {
// Required method
fn delete_borrowed<'life0, 'life1, 'async_trait, Q>(
tx: &'life0 <Self as EntityDatabaseMutation<'a>>::Transaction,
id: &'life1 Q,
) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<bool>> + Send + 'async_trait>>
where Self::PrimaryKey: Borrow<Q>,
Q: KeyType + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Extend an Entity with db-mutating operations which can be performed when provided with a transaction.
Required Methods§
Sourcefn delete_borrowed<'life0, 'life1, 'async_trait, Q>(
tx: &'life0 <Self as EntityDatabaseMutation<'a>>::Transaction,
id: &'life1 Q,
) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<bool>> + Send + 'async_trait>>where
Self::PrimaryKey: Borrow<Q>,
Q: KeyType + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_borrowed<'life0, 'life1, 'async_trait, Q>(
tx: &'life0 <Self as EntityDatabaseMutation<'a>>::Transaction,
id: &'life1 Q,
) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<bool>> + Send + 'async_trait>>where
Self::PrimaryKey: Borrow<Q>,
Q: KeyType + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete an entity by a borrowed form of its primary key.
The type signature here is somewhat complicated, but it breaks down simply: if our primary key is something
like Vec<u8>, we want to be able to use this method even if what we have on hand is &[u8].
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.