mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-04 13:30:48 +00:00

- Move message handler payload data into structs - Organize the file structure used by `editor/src/messages/portfolio/document` `/node_graph` and `/graph_operation` - Make derive attributes use `serde::Serialize, serde::Deserialize` consistently instead of `use serde::{Deserialize, Serialize};` imports - Various other code cleanup and refactoring
19 lines
382 B
Rust
19 lines
382 B
Rust
use crate::messages::prelude::*;
|
|
|
|
#[impl_message(Message, Broadcast)]
|
|
#[derive(PartialEq, Clone, Debug, serde::Serialize, serde::Deserialize)]
|
|
pub enum BroadcastMessage {
|
|
// Sub-messages
|
|
#[child]
|
|
TriggerEvent(BroadcastEvent),
|
|
|
|
// Messages
|
|
SubscribeEvent {
|
|
on: BroadcastEvent,
|
|
send: Box<Message>,
|
|
},
|
|
UnsubscribeEvent {
|
|
on: BroadcastEvent,
|
|
message: Box<Message>,
|
|
},
|
|
}
|