Skip to content

Conversation

@bharatGoswami8
Copy link
Contributor

  • Implemented derive macro for CommData trait impl

#155

/// If no custom ID is provided, the struct or enum name is used as the ID.
/// Example usage:
/// ```
/// pub trait CommData {
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated Documentation.

Copy link
Contributor

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.

Copy link
Contributor Author

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

@bharatGoswami8 bharatGoswami8 force-pushed the rust_com_api_derive_macro_commData branch from 719a3c7 to 7524795 Compare February 10, 2026 03:18
};

if !nv.path.is_ident("id") {
continue;
Copy link
Contributor

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 ?

Copy link
Contributor Author

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 {
Copy link
Contributor

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;
Copy link
Contributor

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 ?

Copy link
Contributor

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

Copy link
Contributor Author

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
@bharatGoswami8 bharatGoswami8 force-pushed the rust_com_api_derive_macro_commData branch from 7524795 to 14a7f51 Compare February 12, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants