pub fn decode_command_params(
request: &IpcRequest,
) -> Result<ControlCommandRequest, DashboardError>Expand description
Examples found in repository?
examples/demo/bootstrap.rs (line 424)
422 fn command_result(&self, request: &IpcRequest) -> Result<IpcResult, DashboardError> {
423 // Decode command parameters.
424 let command = decode_command_params(request)?;
425 // Apply the command to the scenario.
426 let result = self.scenario.command_result(command)?;
427 // Return command result payload.
428 Ok(IpcResult::CommandResult {
429 // Include target identifier.
430 target_id: self.scenario.target_id().to_owned(),
431 // Include command result.
432 result,
433 // End command result payload.
434 })
435 // End command result handling.
436 }