stefans-utils 0.1.0

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

impl<T: AsClone<C>, C: Clone> AsClone<C> for &T {
    fn as_clone(&self) -> C {
        (*self).as_clone()
    }
}