ccxt_exchanges/
exchange.rs1#![allow(deprecated)]
25
26#[deprecated(
29 since = "0.2.0",
30 note = "Use `ccxt_core::Exchange` instead. This module will be removed in a future version."
31)]
32pub use ccxt_core::Exchange;
33
34#[deprecated(
35 since = "0.2.0",
36 note = "Use `ccxt_core::ExchangeCapabilities` instead. This module will be removed in a future version."
37)]
38pub use ccxt_core::ExchangeCapabilities;
39
40#[deprecated(
42 since = "0.2.0",
43 note = "Use `ccxt_core::BoxedExchange` instead. This module will be removed in a future version."
44)]
45pub use ccxt_core::BoxedExchange;
46
47#[deprecated(
48 since = "0.2.0",
49 note = "Use `ccxt_core::ArcExchange` instead. This module will be removed in a future version."
50)]
51pub use ccxt_core::ArcExchange;
52
53#[cfg(test)]
54mod tests {
55 #[allow(deprecated)]
56 use super::*;
57
58 #[test]
59 fn test_deprecated_capabilities_reexport() {
60 let caps = ExchangeCapabilities::all();
63 assert!(caps.fetch_ticker());
64 assert!(caps.create_order());
65 assert!(caps.websocket());
66
67 let public_caps = ExchangeCapabilities::public_only();
68 assert!(public_caps.fetch_tickers());
69 assert!(!public_caps.create_order());
70 assert!(!public_caps.websocket());
71 }
72
73 #[test]
74 fn test_deprecated_capabilities_has_method() {
75 let caps = ExchangeCapabilities::all();
76 assert!(caps.has("fetchTicker"));
77 assert!(caps.has("createOrder"));
78 assert!(!caps.has("unknownCapability"));
79 }
80}