use serde::{Deserialize, Serialize};
mod common;
#[cfg(feature = "sync")]
mod sync;
#[cfg(feature = "async")]
mod r#async;
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize, Default)]
pub struct FundamentalData {
pub data: String,
}
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize, Default)]
pub enum FundamentalReportType {
#[default]
ReportsFinSummary,
ReportSnapshot,
RESC,
CalendarReport,
}
impl FundamentalReportType {
pub fn as_str(&self) -> &'static str {
match self {
Self::ReportsFinSummary => "ReportsFinSummary",
Self::ReportSnapshot => "ReportSnapshot",
Self::RESC => "RESC",
Self::CalendarReport => "CalendarReport",
}
}
fn from_wire(s: &str) -> Option<Self> {
match s {
"ReportsFinSummary" => Some(Self::ReportsFinSummary),
"ReportSnapshot" => Some(Self::ReportSnapshot),
"RESC" => Some(Self::RESC),
"CalendarReport" => Some(Self::CalendarReport),
_ => None,
}
}
}
impl_wire_enum!(FundamentalReportType);
#[cfg(test)]
#[path = "types_tests.rs"]
mod types_tests;