pub trait MarketKey:
Clone
+ Eq
+ Hash
+ Debug
+ Send
+ Sync
+ 'static {
type Value: Clone + Debug + Send + Sync + 'static;
}Expand description
A typed address for one piece of market data.
Implementing this trait is the extension point of the whole design:
the key names what is identified (symbol, currency, pair, …) and
its associated Value fixes which type a lookup returns. Anyone —
including downstream crates and tests — can add key types without
touching Market.
ⓘ
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
struct Correlation(String, String);
impl MarketKey for Correlation { type Value = CorrelationTermStructure; }Required Associated Types§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".