type_hash 0.3.0

Generate a hash for a Rust type. The primary use-case for this crate is for detecting differences in message types between versions of a crate. The `TypeHash` trait is implemented for most built-in types and a derive macro is provided, for implementing it for your own types.
Documentation
#![allow(unused)]
use type_hash::TypeHash;

#[test]
fn type_hashes_same_for_skipped_field_as_type_without_field() {
    assert_eq!(v1::MyStruct::type_hash(), v2::MyStruct::type_hash(),);
}

mod v1 {
    use type_hash::TypeHash;
    #[derive(TypeHash)]
    pub struct MyStruct {
        #[type_hash(skip)]
        a: bool,
        b: u32,
    }
}

mod v2 {
    use type_hash::TypeHash;
    #[derive(TypeHash)]
    pub struct MyStruct {
        b: u32,
    }
}