dioxus/packages/desktop/src/events.rs

20 lines
387 B
Rust
Raw Normal View History

2022-02-13 18:56:11 +00:00
//! Convert a serialized event to an event trigger
use serde::{Deserialize, Serialize};
#[derive(Deserialize, Serialize, Debug)]
pub struct IpcMessage {
2022-02-13 18:56:11 +00:00
method: String,
params: serde_json::Value,
}
impl IpcMessage {
pub(crate) fn method(&self) -> &str {
self.method.as_str()
}
pub(crate) fn params(self) -> serde_json::Value {
self.params
}
}