#[non_exhaustive]pub struct FactUnit {
pub start: Option<String>,
pub end: Option<String>,
pub val: Option<f64>,
pub accn: Option<String>,
pub fy: Option<i32>,
pub fp: Option<String>,
pub form: Option<String>,
pub filed: Option<String>,
pub frame: Option<String>,
}Expand description
A single data point for an XBRL fact.
Represents one reported value from a specific filing and period.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.start: Option<String>Start date of the reporting period (for duration facts, e.g., revenue)
end: Option<String>End date of the period (for duration facts) or instant date (for point-in-time facts)
val: Option<f64>The reported value
accn: Option<String>Accession number of the filing that reported this value
fy: Option<i32>Fiscal year
fp: Option<String>Fiscal period (FY, Q1, Q2, Q3, Q4)
form: Option<String>Form type (10-K, 10-Q, etc.)
filed: Option<String>Date the filing was filed
frame: Option<String>Frame identifier (e.g., “CY2023Q4I”)
Implementations§
Source§impl FactUnit
impl FactUnit
Sourcepub fn to_dataframe(&self) -> PolarsResult<DataFrame>
pub fn to_dataframe(&self) -> PolarsResult<DataFrame>
Converts this struct to a single-row polars DataFrame.
All scalar fields are included as columns. Nested objects and complex types are excluded.
This method is auto-generated by the ToDataFrame derive macro.
Sourcepub fn vec_to_dataframe(items: &[Self]) -> PolarsResult<DataFrame>
pub fn vec_to_dataframe(items: &[Self]) -> PolarsResult<DataFrame>
Converts a slice of structs to a multi-row polars DataFrame.
All scalar fields are included as columns. Nested objects and complex types are excluded.
This method is auto-generated by the ToDataFrame derive macro.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FactUnit
impl<'de> Deserialize<'de> for FactUnit
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>,
Auto Trait Implementations§
impl Freeze for FactUnit
impl RefUnwindSafe for FactUnit
impl Send for FactUnit
impl Sync for FactUnit
impl Unpin for FactUnit
impl UnsafeUnpin for FactUnit
impl UnwindSafe for FactUnit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more