You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sending events over channels is possible because DomainEvents can be serialized and deserialized before sending and after receiving.
However, in cases where a command is to be sent, a channel sending and receiving aggregate commands cannot generally be constructed and has to be handled on a case by case basis for each aggregate command type.
One way to fix this is to add a constraint to the Aggregate trait such as:
#[async_trait]
pub trait Aggregate: Default + Serialize + DeserializeOwned + Sync + Send {
/// Specifies the inbound command used to make changes in the state of the Aggregate.
type Command: Serialize + DeserializeOwned + fmt::Debug + Sync + Send;
...
}
Sending events over channels is possible because DomainEvents can be serialized and deserialized before sending and after receiving.
However, in cases where a command is to be sent, a channel sending and receiving aggregate commands cannot generally be constructed and has to be handled on a case by case basis for each aggregate command type.
One way to fix this is to add a constraint to the Aggregate trait such as:
See #32
The text was updated successfully, but these errors were encountered: