Module zero_alloc_message

Source
Expand description

Zero-allocation message processing for WebSocket exchanges

This module provides concrete implementations showing how to process WebSocket messages from exchanges with zero allocations using borrowed values.

Structs§

BufferStats
Buffer usage statistics for monitoring performance
OrderUpdateOwned
Owned version of order update (only allocate when necessary)
ZeroAllocMarketData
Zero-allocation market data processing
ZeroAllocMessageProcessor
Zero-allocation WebSocket message processor with buffer reuse
ZeroAllocOrderUpdate
Zero-allocation order update processing

Enums§

MessageType
Message type classification

Functions§

example_zero_alloc_handler
Example usage in WebSocket handler
extract_string_field_zero_alloc
Convenience function for zero-allocation JSON field extraction
identify_message_type_zero_alloc
Convenience function for zero-allocation message type identification
parse_order_zero_alloc
Convenience function for zero-allocation order parsing
parse_trade_zero_alloc
Convenience function for zero-allocation trade parsing
with_zero_alloc_processor
Access thread-local zero-allocation message processor

Type Aliases§

MessageBuffer
Stack-allocated buffer for small messages