Crate rust_key_paths

Crate rust_key_paths 

Source
Expand description

§rust-key-paths

Type-safe, composable keypaths for Rust with zero-cost abstractions.

This crate re-exports rust-keypaths and keypaths-proc for convenience:

  • rust_keypaths - Direct re-export (required for proc macros)
  • kp - Short alias for rust-keypaths
  • kpm - Short alias for keypaths-proc

§Usage

use rust_key_paths::kpm::Keypaths;
use rust_key_paths::rust_keypaths; // Required for derive macros

#[derive(Keypaths)]
#[Writable]
struct MyStruct {
    field: String,
}

Re-exports§

pub use rust_keypaths;
pub use rust_keypaths as kp;
pub use keypaths_proc as kpm;

Structs§

KeyPath
OptionalKeyPath
WritableKeyPath
WritableOptionalKeyPath

Derive Macros§

Casepaths
Derives case path methods for enum variants.
Keypaths
Derives keypath methods for struct fields.