1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use syn::parse::ParseStream;

pub trait NorthStateDataClone {
    fn clone_box(&self) -> Box<dyn NorthStateData>;
}

impl<T> NorthStateDataClone for T
    where
        T: 'static + NorthStateData + Clone,
{
    fn clone_box(&self) -> Box<dyn NorthStateData> {
        Box::new(self.clone())
    }
}

impl Clone for Box<dyn NorthStateData> {
    fn clone(&self) -> Box<dyn NorthStateData> {
        self.clone_box()
    }
}

pub trait NorthStateData: NorthStateDataClone + Send + Sync {
}