dias 0.2.0

Minimal cross-platform support for common platform specific things, intended for small games for web plus desktopy platforms.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub trait Exiter {
    fn exit(&mut self);
}

#[cfg(test)]
mod test {
    use super::*;

    #[test]
    fn boxability() {
        // It is useful to be able to store exiters, which for practical purposes requires boxing.
        // So test that boxing is possible and not difficult.
        fn _test<E: 'static + Exiter>(exiter: E) {
            let _: Box<_> = Box::new(exiter);
        }
    }
}