stefans-utils 0.2.1

A collection of useful Rust utility functions, types, and traits.
Documentation
1
2
3
4
5
6
7
8
9
pub trait AsCopy<T: Copy> {
    fn as_copy(&self) -> T;
}

impl<T: AsCopy<C>, C: Copy> AsCopy<C> for &T {
    fn as_copy(&self) -> C {
        (*self).as_copy()
    }
}