Skip to main content

DataMarkerExtractor

Trait DataMarkerExtractor 

Source
pub trait DataMarkerExtractor: Send + Sync {
    // Required methods
    fn data_class(&self) -> DataClass;
    fn identifier(&self, msg: &dyn Any) -> Option<String>;
    fn timestamps(&self, msg: &dyn Any) -> Option<(UnixNanos, UnixNanos)>;
    fn fingerprint(&self, msg: &dyn Any) -> Option<[u8; 32]>;
}
Expand description

Extracts marker sidecar fields from a concrete market-data message.

The bus tap passes messages as &dyn Any, so implementations downcast to the type they were registered for and return None when the registry is miswired.

Required Methods§

Source

fn data_class(&self) -> DataClass

Returns the data class handled by this extractor.

Source

fn identifier(&self, msg: &dyn Any) -> Option<String>

Returns the stable stream identifier for the message.

Source

fn timestamps(&self, msg: &dyn Any) -> Option<(UnixNanos, UnixNanos)>

Returns (ts_event, ts_init) for the message.

Source

fn fingerprint(&self, msg: &dyn Any) -> Option<[u8; 32]>

Returns the class-specific canonical content fingerprint for the message.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§