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
/*
 * --------------------
 * THIS FILE IS LICENSED UNDER MIT
 * THE FOLLOWING MESSAGE IS NOT A LICENSE
 *
 * <barrow@tilde.team> wrote this file.
 * by reading this text, you are reading "TRANS RIGHTS".
 * this file and the content within it is the gay agenda.
 * if we meet some day, and you think this stuff is worth it,
 * you can buy me a beer, tea, or something stronger.
 * -Ezra Barrow
 * --------------------
 */

/// timemachine error type
#[derive(Debug, PartialEq)]
pub enum ErrorKind {
    /// Unimplemented function. This is my bad.
    NotImplemented,
    /// Attempted to get the current state of an empty TimeMachine. This is your bad.
    EmptyTimeMachine,
    /// Generic Error
    Generic(String),
}
pub(crate) type Result<T> = std::result::Result<T, ErrorKind>;

// use crate::impl_from;
// #[doc(hidden)]
// #[macro_export]
// macro_rules! impl_from {
//     ($from:path, $to:expr) => {
//         impl From<$from> for ErrorKind {
//             fn from(e: $from) -> Self {
//                 $to(e)
//             }
//         }
//     };
// }