serde_edifact 0.4.0

A Serde for Edifact.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::fmt::Display;

use crate::error::Error;
use serde::Serialize;

pub fn to_string<T>(value: &T) -> Result<String, Error>
where
    T: Serialize + Display,
{
    let final_string = format!("{}",value);
    #[cfg(feature = "debug")]
    println!("debug vec: {final_string}");
    Ok(final_string)
}