csdif_core/
forward_mapper.rs1use sensorml::model::document::SensorMLDocument;
5use crate::error::ContextError;
6use crate::error::MappingError;
7
8pub trait InitiativeForwardMapper {
9 fn map_to_sensorml(
10 &self,
11 input: &serde_json::Value,
12 context: &dyn ContextProvider,
13 ) -> Result<SensorMLDocument, MappingError>;
14}
15
16pub trait ContextProvider {
18 fn get_station_profile(&self, id: &str) -> Result<StationProfile, ContextError>;
19}
20
21#[derive(Debug)]
22pub struct StationProfile {
23 pub id: String,
24}
25