ocpi 0.3.5

Unofficial, in progress, OCPI implementation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::{CommandResponseType, DisplayText};

/// # 13.3.2. CommandResponse Object
///
/// The CommandResponse object is send in the HTTP response body.
/// Because OCPI does not allow/require retries, it could happen that the asynchronous
/// result url given by the eMSP is never successfully called.
/// The eMSP might have had a glitch, HTTP 500 returned, was offline for a moment etc.
/// For the eMSP to be able to give a quick as possible response to another system or driver app.
/// it is important for the eMSP to known the timeout on a certain command.
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct CommandResponse {
    pub result: CommandResponseType,
    pub timeout: u64,

    #[serde(skip_serializing_if = "Vec::is_empty")]
    pub message: Vec<DisplayText>,
}