Closed nebneb0703 closed 2 years ago
move topic attribute as just a literal string because all topics are gonna have a topic string
i am really fucking stupid, of course get() -> S
cannot work.
generate a macro (via the proc macro hehe) to convert topic types, like topic!
was already shown to do.
realised an issue with the current implementation on topics branch, the generated topic!
macro doesn't have the ::
syntax i wanted. implement a proper context for this, maybe using a vec of literals so we can choose how to join them, or just go the lazy route and create a second context which uses ::
as the separator.
Merged with #6
Topic structs:
topic() -> String
with additional arguments defined in macromessage() -> T
which returns a proto structure (default()
) for the initial request to the given topicTopic enum:
get() -> S
which returns the topic struct defined above. this should be implemented for all topics. use a trait and unwind.Example syntax:
generates into:
Helper macro for nested topics: