Skip to main content

r402_core/scheme/
sealed.rs

1//! Sealed-trait marker preventing third-party `SchemeServer` / `SchemeClient`
2//! implementations.
3//!
4//! x402 schemes are protocol-critical: an unsanctioned implementation would
5//! fragment the network. Only crates inside this workspace (`r402-evm`,
6//! `r402-svm`, future chain crates) may implement the scheme traits.
7//!
8//! The marker trait lives in a public but `#[doc(hidden)]` module so that
9//! official sibling crates can implement it on their scheme types while
10//! external crates cannot (the path `__sealed::Sealed` is documented as
11//! unstable / internal).
12
13/// Internal sealed-trait module. **Not public API.**
14#[doc(hidden)]
15pub mod __sealed {
16    /// Internal sealed-trait marker. **Do not implement.**
17    pub trait Sealed {}
18}
19
20pub use __sealed::Sealed;
21
22impl Sealed for super::ExactScheme {}
23impl Sealed for super::UptoScheme {}
24impl Sealed for super::BatchSettlementScheme {}
25impl Sealed for super::AuthCaptureScheme {}