pub trait DomainFactory<Input> {
type Product;
type Error;
// Required method
fn create(&self, input: Input) -> Result<Self::Product, Self::Error>;
}Expand description
English:
Constructs a domain product from owned input, reporting a typed construction error.
Validation, identifier allocation, and side effects are chosen by the implementation;
this trait does not require the product to be an aggregate or provide persistence.
A shared receiver does not require Send, Sync, or side-effect-free construction.
日本語:
所有する入力からドメインの生成物を構築し、型付きの構築エラーを返します。
検証、識別子の割り当て、副作用は実装が定めます。生成物を集約に制限せず、永続化も提供しません。
共有参照のレシーバーは、Send、Sync、副作用のない構築を要求するものではありません。
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".