pub trait ResolvableModel:
ByUuid
+ Serialize
+ DeserializeOwned
+ Send
+ Sync {
type Fingerprint: Serialize + Send;
// Required methods
fn uuid(&self) -> Uuid;
fn fingerprint(&self) -> Self::Fingerprint;
fn resolve<'life0, 'life1, 'async_trait>(
database: &'life0 Database,
identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn resolve_cached<'life0, 'life1, 'async_trait>(
database: &'life0 Database,
identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Required Associated Types§
type Fingerprint: Serialize + Send
Required Methods§
fn uuid(&self) -> Uuid
fn fingerprint(&self) -> Self::Fingerprint
fn resolve<'life0, 'life1, 'async_trait>(
database: &'life0 Database,
identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
fn resolve_cached<'life0, 'life1, 'async_trait>(
database: &'life0 Database,
identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".