//! Common utilities and shared types for Foxhunt HFT Trading System //! //! This crate contains shared utilities that are used across multiple services //! in the Foxhunt HFT trading system, eliminating code duplication and providing //! a consistent interface for common operations. //! //! # Modules //! //! - [`database`] - Database connection utilities and configurations //! - [`error`] - Common error types and utilities //! - [`traits`] - Shared traits used across services //! - [`constants`] - Shared constants and configuration values //! - [`types`] - Common data types #![warn(missing_docs)] #![warn(missing_debug_implementations)] #![warn(rust_2018_idioms)] #![deny( clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::unreachable )] pub mod constants; pub mod database; pub mod error; pub mod traits; pub mod trading; pub mod types; // REMOVED prelude module - violates type governance and creates hidden coupling // All imports must be explicit to maintain clear architectural boundaries // CRITICAL: These re-exports are necessary for backward compatibility // They will be removed in a future refactor once all crates are updated pub use types::{ // Core types Decimal, Price, Volume, Quantity, Symbol, HftTimestamp, AssetId, // Trading types OrderId, OrderSide, OrderStatus, OrderType, TimeInForce, Order, Position, Execution, ExecutionId, // Event types (moved from trading_engine) OrderEvent, OrderEventType, // Market data types MarketDataEvent, TradeEvent, QuoteEvent, BarEvent, OrderBookEvent, Level2Update, PriceLevel, ConnectionStatus, ConnectionEvent, Aggregate, MarketStatus, ErrorEvent, Subscription, // Error types CommonTypeError, }; // Re-export trading types from trading module pub use trading::MarketRegime; // Re-export error types from error module pub use error::{CommonError, ErrorCategory, CommonResult}; // Test module for database features #[cfg(all(test, feature = "database"))] mod sqlx_test;