Skip to main content

aspect_core/pointcut/
mod.rs

1//! Pointcut expressions for pattern-based aspect weaving.
2//!
3//! Pointcuts allow you to declaratively specify which functions should have
4//! aspects applied based on patterns like function name, visibility, module path, etc.
5//!
6//! # Example
7//!
8//! ```rust
9//! use aspect_core::pointcut::*;
10//!
11//! // Match all public functions
12//! let pc = Pointcut::parse("execution(pub fn *(..))").unwrap();
13//!
14//! // Match functions in a specific module
15//! let pc = Pointcut::parse("within(crate::api)").unwrap();
16//!
17//! // Combine with boolean logic
18//! let pc = Pointcut::parse("execution(pub fn *(..)) && within(crate::api)").unwrap();
19//! ```
20
21pub mod ast;
22pub mod matcher;
23pub mod parser;
24pub mod pattern;
25
26pub use ast::Pointcut;
27pub use matcher::{FunctionInfo, Matcher};
28pub use parser::parse_pointcut;
29pub use pattern::{ExecutionPattern, ModulePattern, NamePattern, Visibility};