jquants_api_client/api/shared/responses/
error_response.rs

1//! The common error response definition for the JQuants API.
2
3use std::{error::Error, fmt};
4
5use serde::Deserialize;
6
7/// The common error response definition for the JQuants API.
8#[derive(Debug, PartialEq, Eq, Deserialize)]
9pub struct JQuantsErrorResponse {
10    /// The error message.
11    pub message: String,
12}
13
14impl fmt::Display for JQuantsErrorResponse {
15    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
16        write!(f, "{}", self.message)
17    }
18}
19
20impl Error for JQuantsErrorResponse {}