pub struct CommandResponse {
pub result: CommandResponseType,
pub timeout: u32,
pub message: Vec<DisplayText>,
pub extensions: Extensions,
}v2_3_0 only.Expand description
The synchronous answer to a command request.
Because OCPI does not allow/require retries, it could happen that the asynchronous result url given by the eMSP is never successfully called. … it is important for the eMSP to know the timeout on a certain command.
Spec: 2.3.0 §mod_commands_commandresponse_object
Fields§
§result: CommandResponseTypeResponse from the CPO on the command request.
timeout: u32Timeout for this command in seconds.
When the Result is not received within this timeout, the eMSP can assume that the message might never be sent.
message: Vec<DisplayText>Human-readable description of the result, in one or more languages.
extensions: ExtensionsUndocumented JSON fields, preserved verbatim.
Implementations§
Source§impl CommandResponse
impl CommandResponse
Sourcepub fn builder() -> CommandResponseBuilder
pub fn builder() -> CommandResponseBuilder
Create an instance of CommandResponse using the builder syntax
Source§impl CommandResponse
impl CommandResponse
Sourcepub const fn timeout_duration(&self) -> Duration
pub const fn timeout_duration(&self) -> Duration
The timeout as a std::time::Duration, for awaiting the asynchronous result.
Sourcepub fn expects_result(&self) -> bool
pub fn expects_result(&self) -> bool
Whether a CommandResult should be expected on the response_url.
Only an ACCEPTED command has been forwarded to the Charge Point; the other outcomes are
final already.
Trait Implementations§
Source§impl Clone for CommandResponse
impl Clone for CommandResponse
Source§fn clone(&self) -> CommandResponse
fn clone(&self) -> CommandResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CommandResponse
impl Debug for CommandResponse
Source§impl<'de> Deserialize<'de> for CommandResponse
impl<'de> Deserialize<'de> for CommandResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for CommandResponse
impl JsonSchema for CommandResponse
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more