feat: enhance require! macro to accept typed error values #335
No reviewers
Labels
No labels
adr
automated
bug
chore
dependencies
documentation
enhancement
epic
github-actions
P1-high
P2-medium
P3-low
release
research
rust
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jwilger/eventcore!335
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/327-require-typed-errors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
require!macro single-expression arm to useInto<CommandError>instead ofToString+BusinessRuleViolationFrom<String>andFrom<&str>impls forCommandErrorso existing string-literal usage works unchangedrequire!(state.is_valid(), MyError::InvalidState)with typed error enumsTest plan
developer_uses_typed_error_with_require_macropassesdeveloper_typed_error_allows_passing_conditionpassesrequire!tests pass unchanged (backward compatible)Closes #327