dynpatch-macro 0.1.0

Procedural macros for dynpatch - #[patchable], #[patch_impl], #[patch_trait]
Documentation
  • Coverage
  • 100%
    6 out of 6 items documented0 out of 5 items with examples
  • Size
  • Source code size: 9.41 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 310.46 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • eshanized

dynpatch-macro

Procedural macros for the dynpatch hot-patching system.

Macros

  • #[patch_trait] - Mark traits as patchable interfaces
  • #[patchable] - Mark functions/methods for hot-swapping
  • #[patch_impl] - Mark struct implementations as patches
  • #[patch_entry] - Mark patch initialization entry points
  • #[derive(HotConfig)] - Derive hot-reloadable configuration support

Example

use dynpatch_macro::*;

#[patch_trait]
pub trait Handler {
    fn handle(&self, request: Request) -> Response;
}

#[patchable]
fn process(data: &str) -> String {
    data.to_uppercase()
}

License

MIT - See LICENSE file for details