-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Model
trait
#9
Conversation
Rust does not really have a concept of inheritance. Maybe naming it to "Model" might be more appropriate. I see some repetition with the implementation of some of the trait's methods on structs. You can write default implementations in the trait definition and override it when necessary. |
Yes, I found that out too. They will be removed with the next commit :) "Model" is definitely a better name. |
High Level Overview of Change
Add a
Base
trait that brings standard functionalities to allmodels
. TheBase
trait also adds theget_errors
method that checks a model for its unique errors.Context of Change
#7
#11
Type of Change
Test Plan
TODO
Model
torequests
get_errors
get_nftoken_minter_error
get_nftoken_broker_fee_error
Transaction.has_flag()