-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
macro refactor #66
macro refactor #66
Conversation
Also, I just realized that bc I'm using my work laptop, my work account was pushing the changes, sorry for the confusion if there was any regarding that 😅 |
oh, weird, a buid failure, ill be afk for a bit, and will check after, but thats weird, since it builds fine on my machine |
Oh, stable/nightly thing |
…ne on nightly wants it enabled
iced_examples/counter/src/main.rs
Outdated
@@ -38,7 +38,7 @@ enum WindowDirection { | |||
Bottom, | |||
} | |||
|
|||
#[to_layer_message(derives = "Debug Clone")] | |||
#[to_layer_message(attrs = "derive(Debug, Clone)")] |
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 want this be
#[derive(Debug, Cone)]
#[to_layer_messages...]
like this kind.. Can this be achieved?
Ok , I made some adjustments |
Ok, now I think it is fine |
Hmm, I guess it's fair, for some reason I completely forgot the fact I could just take the attrs from DeriveInput (mb bc I was so hung up on the fact that it was panicing if I tried adding attrs to MessageEnum 😅 ) |
Do you mind adding similar macro to iced-sessionlock? |
I personally havent used iced-sessionlock so I'm going to be not familiar with the API but I could take a look after work (in about 6-7 hrs) :) |
Hey @tukanoidd thank you so much for your high quality contributions. As you seem to be using @Decodetalkers library in your projects, would be nice to have your say on our changes. May I invite you to our GitHub org? |
I mean, if you don't mind, sure, although I really don't know how much help I am going to be when it comes to actual logic implementation, as I'm still quite unskilled in this area. |
Hey, here's the refactor I promised. :)
It adds support for generics and also now allows you to provide any kinds of attributes separated by "|" inside of a literal string (I tried different approaches but could only make this one work without needing too much boilerplate) (can check in README).
Let me know what you think and if I need to change anything