1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
use super::*;

#[derive(Copy, Clone, Debug, Eq)]
pub struct AuthorID {
    hash256: Hash,
}

impl PartialEq for AuthorID {
    fn eq(&self, other: &Self) -> bool {
        self.hash256.eq(&other.hash256)
    }
}

impl PartialOrd for AuthorID {
    fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
        self.hash256.as_bytes().partial_cmp(&other.hash256.as_bytes())
    }
}

impl Ord for AuthorID {
    fn cmp(&self, other: &Self) -> Ordering {
        self.hash256.as_bytes().cmp(&other.hash256.as_bytes())
    }
}

impl Serialize for AuthorID {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
        where
            S: Serializer,
    {
        todo!()
    }
}

impl<'de> Deserialize<'de> for AuthorID {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
        where
            D: Deserializer<'de>,
    {
        todo!()
    }
}