Struct AsOf Copy item path Source pub struct AsOf {
pub year: u16 ,
pub month: u8 ,
pub day: u8 ,
}Expand description The date a price was correct on.
A plain calendar date with no timezone, because pricing changes on a
published date rather than at an instant. Ordering is chronological, which
is the only thing a staleness check needs.
A date, checked.
§ Errors
AsOfParseError::OutOfRange if the month or day is not a calendar
value. Day-of-month is checked against the month’s real length,
including February in leap years — a date that cannot exist is a typo,
and a typo in a pricing date is how stale pricing goes unnoticed.
Whether this date is older than horizon.
The horizon is supplied rather than computed from the clock: reading the
wall clock here would make compilation nondeterministic, and a flow that
compiles today and fails tomorrow with no change to its bytes is exactly
what the determinism audit exists to prevent.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Deserialize this value from the given Serde deserializer.
Read more Formats the value using the given formatter.
Read more Converts to this type from the input type.
The associated error which can be returned from parsing.
Parses a string
s to return a value of this type.
Read more Compares and returns the maximum of two values.
Read more Compares and returns the minimum of two values.
Read more Restrict a value to a certain interval.
Read more 🔬 This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range.
Read more This method returns an ordering between
self and
other values if one exists.
Read more Tests less than (for
self and
other) and is used by the
< operator.
Read more Tests less than or equal to (for
self and
other) and is used by the
<= operator.
Read more Tests greater than (for
self and
other) and is used by the
>
operator.
Read more Tests greater than or equal to (for
self and
other) and is used by
the
>= operator.
Read more Serialize this value into the given Serde serializer.
Read more The type returned in the event of a conversion error.
Performs the conversion.
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more The canonical CBOR encoding of this value.
The blake3 digest of this value’s canonical encoding.
🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more Converts the given value to a
String.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.