derive-id

Crates.ioderive-id
lib.rsderive-id
version0.2.0
sourcesrc
created_at2021-06-11 04:43:05.892003
updated_at2023-03-14 10:27:36.339593
descriptionSimple NewType ID's specifically tailored to integrate with Async GraphQL and Diesel
homepage
repository
max_upload_size
id408840
size4,694
Thomas Sieverding (Bajix)

documentation

README

Derive ID

License Cargo Documentation

A one size fits some NewType ID derive specifically tailored to integrate with Async GraphQL and Diesel. In particular, this allows for ID types that can be used in conjunction with diesel::associations::BelongsTo.

	derive_id! {
		#[derive(Identifiable)]
		#[diesel(table_name = content)]
		#[graphql(name = "ContentID")]
		pub struct ContentId(#[diesel(column_name = "id")] i32);
	}
Commit count: 0

cargo fmt