use async_trait::async_trait;
use tracing::info;
use swift_rs_core::domain::Message;
#[async_trait]
pub trait MessageMapper: Send + Sync {
async fn map_mt_to_mx(&self, mt_message: &Message) -> Result<Message, String>;
}
pub struct BasicMessageMapper;
impl BasicMessageMapper {
pub fn new() -> Self {
Self
}
}
#[async_trait]
impl MessageMapper for BasicMessageMapper {
async fn map_mt_to_mx(&self, mt_message: &Message) -> Result<Message, String> {
info!(
"Mapping MT message {} to MX format",
mt_message.metadata.id
);
Err("Mapping not yet implemented".to_string())
}
}