src/bisection_tree/either.rs

branch
dev
changeset 86
d5b0e496b72f
parent 59
9226980e45a7
--- a/src/bisection_tree/either.rs	Mon Dec 30 15:46:28 2024 -0500
+++ b/src/bisection_tree/either.rs	Mon Jan 06 20:29:25 2025 -0500
@@ -1,6 +1,7 @@
 
 use std::iter::Chain;
 use std::sync::Arc;
+use serde::{Serialize, Deserialize};
 
 use crate::types::*;
 use crate::mapping::{
@@ -20,7 +21,7 @@
 /// A structure for storing two [`SupportGenerator`]s summed/chain together.
 ///
 /// This is needed to work with sums of different types of [`Support`]s.
-#[derive(Debug,Clone)]
+#[derive(Debug,Clone,Serialize,Deserialize)]
 pub struct BothGenerators<A, B>(
     pub(super) Arc<A>,
     pub(super) Arc<B>,
@@ -29,7 +30,7 @@
 /// A structure for a [`Support`] that can be either `A` or `B`.
 ///
 /// This is needed to work with sums of different types of [`Support`]s.
-#[derive(Debug,Clone)]
+#[derive(Debug,Clone,Serialize,Deserialize)]
 pub enum EitherSupport<A, B> {
     Left(A),
     Right(B),

mercurial