dfe 0.5.2

DFE - Documentos Fiscais EletrĂ´nicos Brasileiros
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::Transp;
use anyhow::{Error, Result};
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(rename = "transp")]
pub struct TranspProcess {
    #[serde(rename = "modFrete")]
    pub mod_frete: String,
}

pub fn transp_process(transp: Transp) -> Result<TranspProcess, Error> {
    let transp_process = TranspProcess {
        mod_frete: format!("{}", transp.mod_frete),
    };
    Ok(transp_process)
}