summaryrefslogtreecommitdiff
path: root/src/geom/path.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-04-21 21:17:25 +0200
committerLaurenz <laurmaedje@gmail.com>2021-04-21 21:17:25 +0200
commit72478946c261f04754c11f8a6abf6eb0f43dea31 (patch)
treeb2a621804d39ace4e57ec4a51b34d40bb4a98987 /src/geom/path.rs
parentdf58a4d89b67783b1ffc5c3b7282302d59db8c70 (diff)
Make frames serializable 📚
This also makes serialization support non-optional since it's too much feature-management for too little benefit.
Diffstat (limited to 'src/geom/path.rs')
-rw-r--r--src/geom/path.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/geom/path.rs b/src/geom/path.rs
index c9fcf1c0..dcabb9cf 100644
--- a/src/geom/path.rs
+++ b/src/geom/path.rs
@@ -1,11 +1,14 @@
use super::*;
+use serde::{Deserialize, Serialize};
+
/// A bezier path.
-#[derive(Default, Debug, Clone, PartialEq)]
+#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[serde(transparent)]
pub struct Path(pub Vec<PathElement>);
/// An element in a bezier path.
-#[derive(Debug, Clone, PartialEq)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum PathElement {
MoveTo(Point),
LineTo(Point),