PackageTrack
Sign in Get early access

kinded

Generate enums with same variants, but without data.

0.5.0 5.2M downloads/mo #4451 most downloaded on crates.io greyblake/kinded

What this package is like to depend on

Last release 6 months ago

03 Feb 2026

Release timing varies

gaps range from 3 months to 2.2 years

Nearly every release is documented

notes for 9 of 9 stable releases

Nothing withdrawn

no release was ever pulled

3 years old

9 releases · first in 2023

3 releases in the last 12 months

see the full history below

Release timeline

9 releases · Aug 2023 to Feb 2026
2024 2025 2026
Release Pre-release

Releases

latest 9
  1. 0.5.0 03 Feb 2026
    Release notes

    What is kinded?

    Kinded is a Rust procedural macro that generates a companion "kind" enum with the same variants as your original enum but without the associated data.

    New Features

    skip_derive attribute

    Opt out of default trait implementations when you need custom behavior or want to avoid conflicts with other derives.

    use kinded::Kinded;
    
    #[derive(Kinded)]
    #[kinded(skip_derive(Display, FromStr))]
    enum Status {
        Active,
        Inactive,
    }
    
    // Now you can implement Display and FromStr manually

    Available traits to skip: Display, FromStr, From, Clone, Copy, Debug, PartialEq, Eq.

    attrs attribute for generated enum

    Pass extra attributes to the generated kind enum, useful for integrating with serde and other derive macros.

    use kinded::Kinded;
    use serde::{Serialize, Deserialize};
    
    #[derive(Kinded)]
    #[kinded(attrs(derive(Serialize, Deserialize), serde(rename_all = "snake_case")))]
    enum Beverage {
        Coffee(String),
        Tea { flavor: String },
        Water,
    }
    
    // BeverageKind now has Serialize/Deserialize with snake_case naming

    Per-variant attrs attribute

    Apply attributes to individual kind variants for fine-grained control.

    use kinded::Kinded;
    use serde::{Serialize, Deserialize};
    
    #[derive(Kinded)]
    #[kinded(attrs(derive(Serialize, Deserialize)))]
    enum Priority {
        #[kinded(attrs(serde(rename = "p0")))]
        Critical,
        #[kinded(attrs(serde(rename = "p1")))]
        High,
        Normal,
        Low,
    }

    const fn kind() method

    The kind() method is now const fn, enabling use in const contexts.

    use kinded::Kinded;
    
    #[derive(Kinded)]
    enum Direction {
        North,
        South,
        East,
        West,
    }
    
    const NORTH_KIND: DirectionKind = Direction::North.kind();
    
    const fn is_vertical(dir: &Direction) -> bool {
        matches!(dir.kind(), DirectionKind::North | DirectionKind::South)
    }

    Upgrading

    Update your Cargo.toml:

    [dependencies]
    kinded = "0.5"
    Open source →
    Release notes
    • Add skip_derive attribute to opt out of default trait implementations (fixes #19).
    • Add attrs attribute to pass extra attributes to the generated kind enum (e.g., #[kinded(attrs(serde(rename_all = "snake_case")))])
    • Add per-variant attrs attribute to pass attributes to individual kind variants (e.g., #[kinded(attrs(default))]) (fixes #22)
    • Make kind() method const fn, allowing usage in const contexts (fixes #12)
    Open source →
  2. 0.4.1 29 Jan 2026
    Release notes
    • Add #[kinded(rename = "...")] attribute for variants to customize display/parse names. This is useful when the automatic case conversion doesn't produce the desired result.
    Open source →
  3. 0.4.0 30 Oct 2025
    Release notes
    • Update to Rust 2024 edition.
    • no_std support.
    Open source →
  4. 0.3.0 09 Aug 2023
    Release notes

    Changes

    • [BREAKING] - Make ::all() function return an array instead of vector.
    Open source →
    Release notes
    • Make ::all() function return an array instead of vector.
    Open source →
  5. 0.2.0 06 Aug 2023
    Release notes

    Changes

    • Add Kind trait.
    Open source →
    Release notes
    • Add Kind trait.
    Open source →
  6. 0.1.1 05 Aug 2023
    Release notes

    Changes

    • Add ::all() to the kind type to iterate over all kind variants
    • Generate customizable implementation of Display trait
    • Generate implementation of FromStr trait
    Open source →
    Release notes
    • Add ::all() to the kind type to iterate over all kind variants
    • Generate customizable implementation of Display trait
    • Generate implementation of FromStr trait
    Open source →
  7. 0.0.3 04 Aug 2023
    Release notes

    Changes

    • Make the generated kind() function public
    Open source →
    Release notes
    • Make generated kind() function public
    Open source →
  8. 0.0.2 04 Aug 2023
    Release notes

    Changes

    • Support enums with generics
    Open source →
    Release notes
    • Support enums with generics
    Open source →
  9. 0.0.1 04 Aug 2023
    Release notes
    • Very initial release
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive