Skip to content

[Question] Aggregate trait API #162

Answered by ar3s3ru
danieleades asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there! Glad to have you here and please, ask all the questions you want! 😄

Next time consider using the Github Discussion space rather than opening issues though 🙏🏻

I'm curious about the Aggregate trait. In particular, the Aggregate::handle method returns a Result<Option<Vec<Self::Event>>. Is there a semantic difference in this return type between an Option::None and an empty Vec? If there is, where is it documented?

No difference, when I wrote the API (too long ago) I was not aware that an empty Vec does not cause memory allocations 😄

This change was supposed to be part of the v0.5.0 release 👍🏻

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by danieleades
Comment options

You must be logged in to vote
1 reply
@ar3s3ru
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #157 on September 03, 2021 18:50.