pub struct LseCatalogEntry {Show 17 fields
pub dataset: SmolStr,
pub symbol: SmolStr,
pub name: String,
pub ticks: u64,
pub first_tick: String,
pub last_tick: String,
pub years: f64,
pub last_value: f64,
pub change_pct: f64,
pub change_1y: f64,
pub unit: SmolStr,
pub source: SmolStr,
pub category: SmolStr,
pub frequency: SmolStr,
pub country: SmolStr,
pub country_name: String,
pub live: u8,
}Expand description
One catalog record, as the vault serves it.
All seventeen fields were present and non-null on every one of the 22,966 entries measured, so
none is optional. The six descriptive fields nonetheless carry #[serde(default)]: they are
routinely the empty string already (unit on 7,805 entries, source on 8,057), so an absent
field and an empty one mean the same thing here and tolerating absence hides nothing.
Unknown fields are ignored, so a field the provider adds does not break decoding.
Fields§
§dataset: SmolStrDataset name as the catalog spells it ("crypto", "economics", …).
Kept as the provider’s string rather than as an LseDataset, which models price datasets
only. Use price_dataset to resolve one where it exists.
symbol: SmolStrSymbol within the dataset ("BTC/USD", "chlinfind", …).
Unique only together with dataset, not on its own.
name: StringHuman-readable series name ("Bitcoin").
ticks: u64Observation count the provider reports for the series.
u64, not u32, and that is not defensive. The largest measured value is 4,145,394,353
— 96.5% of u32::MAX — on a live crypto tape that keeps growing, so a 32-bit count would
overflow within months of the measurement.
first_tick: StringFirst observation, spelled 2017-08-17 04:00:28.322000 (UTC, no zone marker, the
fractional part optional). Parse with first_tick_time.
last_tick: StringLast observation, spelled as first_tick is. Parse with
last_tick_time.
⚠️ This is a catalog summary statistic and it lags the live tape — measured six hours behind on a continuously trading crypto symbol. It describes the catalog’s own refresh, not feed liveness, and must not be used as a staleness check on a stream.
years: f64Span of the series in years, as the provider computes it.
last_value: f64Most recent value, in whatever unit the series is quoted in.
A display statistic spanning nine orders of magnitude across the catalog
(-20,458,587 to 74,226,775,000), carried as f64 because that is the precision the provider
serves it at. Never an execution input — fetch the series itself for that.
change_pct: f64Most recent change, percent.
change_1y: f64Change over the trailing year, percent.
unit: SmolStrUnit of quotation ("percent", "USD Million", "index", …); empty for price datasets.
source: SmolStrUpstream publisher. Populated only for economics, and not a clean vocabulary — two
spellings of one source were measured ("World Bank" 728 entries, "Worldbank" 344).
category: SmolStrReference category ("Government bond yield", "Credit index", …); empty for price
datasets. Half of the class rule.
frequency: SmolStrPublication frequency as the provider labels it; empty for price datasets. The other half of
the class rule.
⚠️ A dirty label that does not predict observed spacing — see the module documentation before relying on it.
country: SmolStrCountry code.
⚠️ The vault spells the United Kingdom GB here, while the data-api host’s
/bond-yields endpoint spells the same country UK — the only divergence among the 34
codes, and neither host errors on the other’s spelling. Normalise before crossing hosts.
country_name: StringCountry name ("United States").
live: u8Whether the series streams: 1 for a live price dataset, 0 otherwise.
Kept as the provider’s integer rather than a bool so a third value would survive decoding
instead of being coerced. Read it through is_live. Every one of the
15,537 reference entries measured carries 0.
Implementations§
Source§impl LseCatalogEntry
impl LseCatalogEntry
Sourcepub fn class(&self) -> LseDatasetClass
pub fn class(&self) -> LseDatasetClass
Classifies the entry as a price dataset or a reference series.
Uses the provider’s own frequency/category pair; see the module documentation
for the rule and the measurement behind it. An entry populating exactly one of the two —
which no measured entry does — is reported as Reference,
since a populated category is what distinguishes a non-instrument.
Sourcepub fn price_dataset(&self) -> Option<LseDataset>
pub fn price_dataset(&self) -> Option<LseDataset>
Resolves dataset to an LseDataset, where one exists.
§None does not mean “reference”
It means “no LseDataset variant”, and the catalog has two sources of that:
- every reference family, which is
LseDataset::from_catalog_str’s documented contract rather than a failure — those are not instruments and have no variant; and options, which is a price dataset and still has no variant. Measured: of 7,429 price-classified entries, 4,243 resolve and the remaining 3,186 are alloptions.
So pair this with class rather than reading None as a classification.
An entry with LseDatasetClass::Price and None here is an option contract.
Sourcepub fn first_tick_time(&self) -> Result<DateTime<Utc>, LseError>
pub fn first_tick_time(&self) -> Result<DateTime<Utc>, LseError>
Parses first_tick as an instant.
§Errors
Returns LseError::Deserialize if the value is not in the provider’s timestamp
spelling, naming the field so the caller can tell which of the two failed.
Sourcepub fn last_tick_time(&self) -> Result<DateTime<Utc>, LseError>
pub fn last_tick_time(&self) -> Result<DateTime<Utc>, LseError>
Parses last_tick as an instant.
⚠️ Lags the live tape — see the field’s own documentation.
§Errors
Returns LseError::Deserialize if the value is not in the provider’s timestamp
spelling, naming the field so the caller can tell which of the two failed.
Trait Implementations§
Source§impl Clone for LseCatalogEntry
impl Clone for LseCatalogEntry
Source§impl Debug for LseCatalogEntry
impl Debug for LseCatalogEntry
Source§impl<'de> Deserialize<'de> for LseCatalogEntry
impl<'de> Deserialize<'de> for LseCatalogEntry
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 PartialEq for LseCatalogEntry
impl PartialEq for LseCatalogEntry
impl StructuralPartialEq for LseCatalogEntry
Auto Trait Implementations§
impl Freeze for LseCatalogEntry
impl RefUnwindSafe for LseCatalogEntry
impl Send for LseCatalogEntry
impl Sync for LseCatalogEntry
impl Unpin for LseCatalogEntry
impl UnsafeUnpin for LseCatalogEntry
impl UnwindSafe for LseCatalogEntry
Blanket Implementations§
Source§impl<T> AttachedTransformer<()> for T
impl<T> AttachedTransformer<()> for T
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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> 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 moreimpl<T> JsonSchemaMaybe for T
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.