Module models

Source
Expand description

Core domain models for the flow trading system.

This module contains the fundamental data structures that represent the domain entities.

The models in this module are primarily data structures with minimal business logic, following the principles of the hexagonal architecture to separate domain entities from their persistence and processing implementations.

Structs§

ConstantCurve
A representation of a flat demand curve supporting interval, half-line, and full-line trading domains
ConstantCurveDto
A DTO to ensure that we always validate when we deserialize from an untrusted source
DateTimeRangeQuery
A query type for dealing with datetime ranges
DateTimeRangeResponse
The paginated response to a datetime query
DemandGroup
A wrapper around an implementation of a HashMap, with values of f64.
DemandRecord
Represents a demand entity in the flow trading system.
Map
A wrapper around an implementation of a HashMap, defaulting to values of f64.
OutcomeRecord
A timestamped record of an outcome from batch processing.
Point
A representation of a point for use in defining piecewise-linear curves
PortfolioRecord
Represents a portfolio entity in the flow trading system.
ProductGroup
A wrapper around an implementation of a HashMap, with values of f64.
PwlCurve
A representation of a piecewise-linear, weakly monotone decreasing demand curve
PwlCurveDto
DTO to ensure that we always validate when we deserialize from an untrusted source
ValueRecord
A timestamped record of a component of a user’s bid.

Enums§

ConstantCurveError
Errors that can occur when creating or validating a ConstantCurve
DemandCurve
A demand curve expressing a bidder’s willingness to pay at different rates.
DemandCurveDto
DTO for demand curves to enable validation during deserialization
DemandCurveError
Errors that can occur when constructing demand curves
PwlCurveError
Errors that can occur when creating or validating a PwlCurve