aspect-std 0.1.0

Standard aspects library for aspect-rs AOP framework
Documentation

aspect-std

Standard aspects library providing common, production-ready aspects.

This crate provides a collection of reusable aspects for common cross-cutting concerns:

  • Logging: Structured logging with configurable levels
  • Timing: Performance monitoring with statistics
  • Caching: Generic memoization with TTL
  • Metrics: Counters, gauges, and histograms
  • Rate Limiting: Token bucket algorithm for throttling
  • Circuit Breaker: Fault tolerance and failure prevention
  • Authorization: Role-based access control
  • Validation: Pre/post condition checking

Quick Start

use aspect_std::prelude::*;
use aspect_macros::aspect;

// Use the standard logging aspect
#[aspect(LoggingAspect::new())]
fn my_function(x: i32) -> i32 {
    x * 2
}