iex 0.2.0

Idiomatic exceptions
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::marker::PhantomData;

pub struct Marker<E>(PhantomData<E>);

impl<E> Marker<E> {
    pub(crate) unsafe fn new() -> Self {
        Self(PhantomData)
    }
}

impl<E> Clone for Marker<E> {
    fn clone(&self) -> Self {
        *self
    }
}

impl<E> Copy for Marker<E> {}