Skip to main content

Crate aspect_runtime

Crate aspect_runtime 

Source
Expand description

§aspect-runtime

Runtime utilities for aspect-oriented programming in Rust.

This crate provides runtime support for aspects, including:

  • Global aspect registry for managing aspect-pointcut bindings
  • Dynamic aspect application based on pointcut patterns
  • Aspect ordering and composition

§Example

use aspect_runtime::registry::global_registry;
use aspect_core::pointcut::Pointcut;
use std::sync::Arc;

// Register an aspect globally
let pointcut = Pointcut::parse("execution(pub fn *(..))").unwrap();
// global_registry().register(Arc::new(my_aspect), pointcut, 0, Some("logger".into()));

Re-exports§

pub use registry::global_registry;
pub use registry::AspectRegistry;
pub use registry::RegisteredAspect;
pub use registry::GLOBAL_REGISTRY;
pub use once_cell;

Modules§

registry
Global aspect registry for managing aspect-pointcut bindings.