mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 02:48:12 +08:00
Plumb Responses from WASM to JS in the page
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
use crate::tools::ToolType;
|
||||
use crate::Color;
|
||||
use bitflags::bitflags;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::{
|
||||
fmt,
|
||||
ops::{Deref, DerefMut},
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[repr(C)]
|
||||
@@ -25,6 +28,14 @@ pub enum Response {
|
||||
UpdateCanvas { document: String },
|
||||
}
|
||||
|
||||
impl fmt::Display for Response {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
Response::UpdateCanvas { document: _ } => write!(formatter, "UpdateCanvas"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct Trace(Vec<TracePoint>);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user