pub trait AsyncIntoDomain<D>: Versioned + Send {
// Required method
fn into_domain<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Result<D, MigrationError>> + Send + 'async_trait>>
where Self: 'async_trait;
}Expand description
Async version of IntoDomain for domain conversions requiring I/O operations.
Use this trait when converting to the domain model requires asynchronous operations such as fetching additional data from external sources.
Required Methods§
Sourcefn into_domain<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Result<D, MigrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
fn into_domain<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Result<D, MigrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
Asynchronously converts this versioned data into the domain model.
§Errors
Returns MigrationError if the conversion fails.
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.