id-ish

Crates.ioid-ish
lib.rsid-ish
version0.0.3
sourcesrc
created_at2021-02-07 18:19:59.43987
updated_at2021-08-13 08:53:51.265505
descriptionNumeric ID types that can be swapped in & out
homepagehttps://gitlab.com/zeen3/md-clone/-/tree/master/id-ish
repositoryhttps://gitlab.com/zeen3/md-clone
max_upload_size
id352026
size12,719
(ZaneHannanAU)

documentation

README

ID-ish

Provides traits for ID types.

Provides two traits at the top level:

  • ID
  • MaybeID

And two at in id_containers:

  • WithID
  • TakeID

MaybeID has two methods:

  • as_u128
  • into_inner

ID has none, but builds on MaybeID.

Stuff

  • MaybeID has implementations on (), all integer types (i128/u128 optional), and uuid::Uuid (optional).
  • ID has implementations on all integer types, and uuid::Uuid.
  • WithID/TakeID have a default macro that "derives" a WithID/TakeID implementation that's valid for any structure with a leading id field.
Commit count: 18

cargo fmt