mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 02:58:11 +08:00
Use serde to serialize responses (#96)
This commit is contained in:
committed by
Keavon Chambers
parent
9ad5f4ce78
commit
721a442b75
@@ -1,14 +1,15 @@
|
||||
use crate::LayerId;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct LayerPanelEntry {
|
||||
pub name: String,
|
||||
pub visible: bool,
|
||||
pub layer_type: LayerType,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub enum LayerType {
|
||||
Folder,
|
||||
Shape,
|
||||
@@ -25,7 +26,7 @@ impl fmt::Display for LayerType {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[repr(C)]
|
||||
// TODO - Make Copy when possible
|
||||
pub enum DocumentResponse {
|
||||
|
||||
Reference in New Issue
Block a user