proc macros used in my F1 related discord bots.
Find a file
2026-03-31 14:26:43 +02:00
src Add libsql 2026-03-31 14:19:23 +02:00
.gitignore add notifbot_enum macro 2026-03-31 14:18:58 +02:00
Cargo.lock Add libsql 2026-03-31 14:19:23 +02:00
Cargo.toml Add libsql 2026-03-31 14:19:23 +02:00
LICENSE Initial Commit 2026-03-31 14:18:38 +02:00
readme.md Add Readme 2026-03-31 14:26:43 +02:00

F1 Bot Macros

This Proc-Macro library will make enums Database (LibSQL) ready and add a couple nice impls.

Usage

notifbot_enum!{
  pub enum MyEnum {
    VariantA,
    VariantB,
    VariantC
  }
}

The resulting Enum will be #[repr(u8)] and have impls for:

  • serde::Serialize
  • serde::Deserialize
  • Libsql::IntoValue
  • Copy + Clone
  • Hash
  • Eq + PartialEq
  • Display
  • From<MyEnum> for i8
  • From<MyEnum> for &'static str

License

This Library is Licensed under the MIT License (see License)