1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! # Layer 3: Specialization Sugar
//!
//! This module provides specialization mechanisms for Stable Rust.
//!
//! ## Module Structure
//!
//! ```text
//! spec/
//! ├── runtime.rs - Autoref-based runtime detection (returns bool)
//! ├── compile.rs - has_impl! macro for trait detection
//! └── dispatch.rs - Type-level dispatch (SelectCap, MethodImpl)
//! ```
//!
//! ## Usage
//!
//! ### Trait Detection (preferred)
//! ```ignore
//! use tola_caps::caps_check;
//!
//! assert!(caps_check!(String: Clone));
//! assert!(caps_check!(String: Clone & !Copy));
//! ```
//!
//! ### Type-Level Dispatch
//! ```ignore
//! type Impl = <Cap<T> as SelectClone<CloneImpl, FallbackImpl>>::Out;
//! Impl::call(&value);
//! ```
// Re-export key types
pub use SpecializeWrapper;
pub use ;
// Select traits are only available when detect feature is enabled
pub use ;