tola_caps/detect/mod.rs
1//! # Layer 2: Std Trait Detection
2//!
3//! Provides compile-time detection of standard library traits
4//! and automatic capability set construction.
5//!
6//! ## Public API
7//!
8//! Use `caps_check!` macro for trait detection:
9//!
10//! ```ignore
11//! use tola_caps::caps_check;
12//!
13//! // Check if a type implements Clone
14//! let is_clone: bool = caps_check!(String: Clone);
15//!
16//! // Boolean expressions
17//! let is_copy_or_default: bool = caps_check!(i32: Copy | Default);
18//! ```
19//!
20//! ## Supported Traits
21//!
22//! Clone, Copy, Debug, Default, Send, Sync, Eq, PartialEq,
23//! Ord, PartialOrd, Hash, Display, Sized, Unpin
24
25pub mod autocaps;
26
27macros::define_std_traits!();
28
29pub use autocaps::{AutoCapSet, Cap, InsertIf, InsertIfType};