kubetsu: distinguish value type of other struct
This is a library that distinguish struct value type as other type value.
kubetsu (区別) means distinguish in Japanese.
Usage
use Id;
type UserId = ;
type ItemId = ;
type UserId = Id;
let user_id = new;
// you can access original value reference with `inner()`.
assert_eq!;
// you can use `==` that have same value`.
assert_eq!;
serde support
You can serialize and deserialize as original value if you use [serde] crate and feature = "serde" enabled.
use Id;
sqlx support
You can encode and decode Id value if you use sqlx crate and feature = "sqlx" enabled.
You can select "sqlx-xxxx" feature for each driver. ("sqlx-any", "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite")
async
fake support
You can use Faker.fake() if you use fake crate and feature = "fake" enabled.
use Id;
use ;
Install
License
MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) see LICENSE
Copyright (c) 2024 Keiji Yoshimi