mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
Use serde to serialize responses (#96)
This commit is contained in:
committed by
Keavon Chambers
parent
f10a3c63d1
commit
f8ebff033d
@@ -2,6 +2,8 @@ use crate::tools::ToolType;
|
||||
use crate::Color;
|
||||
use bitflags::bitflags;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[doc(inline)]
|
||||
pub use document_core::DocumentResponse;
|
||||
|
||||
@@ -29,7 +31,7 @@ pub enum Event {
|
||||
KeyDown(Key),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[repr(C)]
|
||||
pub enum ToolResponse {
|
||||
SetActiveTool { tool_name: String },
|
||||
@@ -49,7 +51,7 @@ impl fmt::Display for ToolResponse {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[repr(C)]
|
||||
// TODO - Make Copy when possible
|
||||
pub enum Response {
|
||||
|
||||
Reference in New Issue
Block a user