Skip to main content

Module streaming_convert

Module streaming_convert 

Source
Expand description

Adapters from Lightstreamer ItemUpdate to presentation-layer DTOs Adapters from Lightstreamer ItemUpdate to the presentation-layer DTOs.

The presentation DTOs stay transport-agnostic: they expose pure from_fields(..) constructors that take plain field maps. This module is the only place that depends on lightstreamer_rs; it reads an ItemUpdate and feeds the extracted metadata / field maps into those pure constructors.

Both a Result-returning function (for callers that want to observe parse failures) and the From<&ItemUpdate> conversions (which degrade to a default on failure, preserving the previous streaming behaviour) are provided per type.

Functionsยง

account_data_from_item_update
Converts a Lightstreamer ItemUpdate into an AccountData.
chart_data_from_item_update
Converts a Lightstreamer ItemUpdate into a ChartData.
market_data_from_item_update
Converts a Lightstreamer ItemUpdate into a PresentationMarketData.
price_data_from_item_update
Converts a Lightstreamer ItemUpdate into a PriceData.
trade_data_from_item_update
Converts a Lightstreamer ItemUpdate into a TradeData.