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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// create a structure of modules so that generated files can reference exocore's generated code
pub(crate) use exocore::protos as exocore_proto;
pub(crate) mod generated {
    pub(crate) use super::exocore_proto as exocore;
    pub mod exomind {
        pub mod base {
            include!(concat!(env!("OUT_DIR"), "/exomind.base.rs"));
        }
    }
}

pub mod base {
    pub use super::generated::exomind::base::*;
    use exocore::protos::message::NamedMessage;

    impl NamedMessage for Collection {
        fn full_name() -> &'static str {
            "exomind.base.Collection"
        }
    }

    impl NamedMessage for CollectionChild {
        fn full_name() -> &'static str {
            "exomind.base.CollectionChild"
        }
    }

    impl NamedMessage for Snoozed {
        fn full_name() -> &'static str {
            "exomind.base.Snoozed"
        }
    }

    impl NamedMessage for Account {
        fn full_name() -> &'static str {
            "exomind.base.Account"
        }
    }

    impl NamedMessage for EmailThread {
        fn full_name() -> &'static str {
            "exomind.base.EmailThread"
        }
    }

    impl NamedMessage for Email {
        fn full_name() -> &'static str {
            "exomind.base.Email"
        }
    }

    impl NamedMessage for DraftEmail {
        fn full_name() -> &'static str {
            "exomind.base.DraftEmail"
        }
    }

    impl NamedMessage for EmailPart {
        fn full_name() -> &'static str {
            "exomind.base.EmailPart"
        }
    }

    impl NamedMessage for EmailAttachment {
        fn full_name() -> &'static str {
            "exomind.base.EmailAttachment"
        }
    }

    impl NamedMessage for Note {
        fn full_name() -> &'static str {
            "exomind.base.Note"
        }
    }

    impl NamedMessage for Task {
        fn full_name() -> &'static str {
            "exomind.base.Task"
        }
    }

    impl NamedMessage for Link {
        fn full_name() -> &'static str {
            "exomind.base.Link"
        }
    }

    impl NamedMessage for Contact {
        fn full_name() -> &'static str {
            "exomind.base.Contact"
        }
    }
}