dynpatch-macro 0.1.0

Procedural macros for dynpatch - #[patchable], #[patch_impl], #[patch_trait]
Documentation

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