-
Notifications
You must be signed in to change notification settings - Fork 45
Rust::com Derive macro for CommData #156
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
base: main
Are you sure you want to change the base?
Rust::com Derive macro for CommData #156
Conversation
| /// If no custom ID is provided, the struct or enum name is used as the ID. | ||
| /// Example usage: | ||
| /// ``` | ||
| /// pub trait CommData { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add to doc of ComData trait that user shall not implement manually but use this macros.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated Documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant to place where pub trait ComData is defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added documentation on - com-api/com-api-concept/com_api_concept.rs
719a3c7 to
7524795
Compare
| }; | ||
|
|
||
| if !nv.path.is_ident("id") { | ||
| continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it snot id, then it shall be error or ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, we should return error if it is not id.
| /// If no custom ID is provided, the struct or enum name is used as the ID. | ||
| /// Example usage: | ||
| /// ``` | ||
| /// pub trait CommData { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant to place where pub trait ComData is defined.
| }; | ||
|
|
||
| let Ok(Meta::NameValue(nv)) = list.parse_args::<Meta>() else { | ||
| continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if its anything else then also error ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add test cases for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, we should return error.
* Implemented derive macro for CommData trait impl
7524795 to
14a7f51
Compare
#155