cast_trait

Crates.iocast_trait
lib.rscast_trait
version0.1.2
sourcesrc
created_at2018-04-10 00:27:33.446744
updated_at2018-04-29 22:13:48.238666
descriptioncast trait
homepagehttps://gitlab.com/nathanfaucett/rs-cast_trait
repositoryhttps://gitlab.com/nathanfaucett/rs-cast_trait.git
max_upload_size
id59802
size7,645
Nathan Faucett (nathanfaucett)

documentation

README

rs-cast_trait

cast trait

use cast_trait::Cast;

fn cast<A, B>(a: A) -> B
where A: Cast<B>,
{
	a.cast()
}

assert_eq!(cast::<i32, f32>(10_i32), 10_f32);
Commit count: 4

cargo fmt