Skip to content
Dev.to1 min read

Elegant Rust with proc macros

When writing immediate mode (egui) applications it comes to me quickly that nigh all logic computations should be done off the UI thread. There are many ways to approach it, however as a fan of event-based systems sooner or later I implement some kind of event handling. The pattern is almost the same with minor differences and looks like this: #[derive(Clone)] pub struct ProcessorConfig { pub id: String } #[derive(Clone)] pub struct TaskResult { pub success: bool } pub struct State { pub active_
Read original on dev.to
0
0

Comment

Sign in to join the discussion.

Loading comments…

Related

Get the 10 best reads every Sunday

Curated by AI, voted by readers. Free forever.

Liked this? Start your own feed.

0
0