Open xiaoas opened 1 year ago
I believe this is intentional. Instead, the builder pattern is used to force compliance with the different CloudEvent Spec versions (0.3 and 1.0). It aligns with this note in the API guidelines:
If your type has a multiplicity of construction options though, consider the builder pattern (C-BUILDER) instead.
Users expect to use
Event::new()
to construct a event. According to API guideline: https://rust-lang.github.io/api-guidelines/predictability.htmlEvent::new()