Expand description
Trading-specific memory pools for zero-allocation hot paths
This module provides specialized memory pool integrations designed for high-frequency trading operations, eliminating allocations in critical paths such as order processing, WebSocket message handling, and market data processing.
Re-exports§
pub use OrderProcessingPool8 as DefaultOrderProcessingPool;pub use TradingPoolManager4096 as DefaultTradingPoolManager;pub use WebSocketMessagePool4096 as DefaultWebSocketMessagePool;
Structs§
- Default
Order Processing - Default implementation for buffer allocation
- Json
Processing Pool - JSON processing pool for zero-allocation JSON operations
- Market
Data Pool - Market data pool for zero-allocation market data processing
- Order
Processing Pool - Order processing pool for zero-allocation order operations with const generic SmallVec capacity
- Trading
Pool Manager - Trading-specific memory pool manager for zero-allocation operations with const generic buffer sizing
- WebSocket
Message Pool - WebSocket message pool for zero-allocation message processing with const generic threshold
Enums§
- Order
Buffer Type - Types of order processing buffers
- WebSocket
Message Type - WebSocket message types for pool optimization
Traits§
- Pooled
Order Processing - Helper trait for zero-allocation order processing Note: Concrete implementations should be done in crates that have access to order types
- Pooled
WebSocket Message - Helper trait for zero-allocation WebSocket message processing
Functions§
- get_
global_ trading_ pools - Get global trading pools (use for initialization and statistics)
- get_
thread_ local_ pools Deprecated - Get thread-local trading pools (legacy API for compatibility)
- initialize_
trading_ pools - Initialize trading pools with custom configuration
- with_
thread_ local_ pools - Get thread-local trading pools for maximum performance
Type Aliases§
- Order
Processing Pool4 - Order processing pool with SmallVec capacity of 4 elements
- Order
Processing Pool8 - Order processing pool with SmallVec capacity of 8 elements
- Order
Processing Pool16 - Order processing pool with SmallVec capacity of 16 elements
- Trading
Pool Manager2048 - Trading pool manager with 2KB WebSocket threshold and 16-element SmallVec capacity
- Trading
Pool Manager4096 - Trading pool manager with 4KB WebSocket threshold and 8-element SmallVec capacity
- Trading
Pool Manager8192 - Trading pool manager with 8KB WebSocket threshold and 4-element SmallVec capacity
- WebSocket
Message Pool2048 - WebSocket message pool with 2KB threshold for small messages
- WebSocket
Message Pool4096 - WebSocket message pool with 4KB threshold for small messages
- WebSocket
Message Pool8192 - WebSocket message pool with 8KB threshold for small messages