pub enum Numbers<R: ReadAt> {
F32(GenericNumbers<f32, R>),
F64(GenericNumbers<f64, R>),
I64(GenericNumbers<i64, R>),
Date(GenericNumbers<NaiveDate, R>),
DateTime(GenericNumbers<DateTime<Utc>, R>),
}
Expand description
Iterator for reading number data of various types.
You can access the variants directly or use the try_into_f64
and try_into_i64
methods.
These methods can both fail so aren’t automatic.
Variants§
F32(GenericNumbers<f32, R>)
F64(GenericNumbers<f64, R>)
I64(GenericNumbers<i64, R>)
Date(GenericNumbers<NaiveDate, R>)
DateTime(GenericNumbers<DateTime<Utc>, R>)
Implementations§
Source§impl<R: ReadAt> Numbers<R>
impl<R: ReadAt> Numbers<R>
Sourcepub fn try_into_f64(self) -> Result<NumbersF64<R>, Error>
pub fn try_into_f64(self) -> Result<NumbersF64<R>, Error>
Turns this into an f64
iterator, casting values.
If the numbers use type i64
this will fail with Error::UnsafeCast
. Dates will become
days since the ‘1970-01-01’ epoch. Date-times will become seconds since the
‘1970-01-01T00:00:00Z’ epoch with a small loss of precision.
Currently can’t fail but future number types might yield Error::UnsafeCast
.
Sourcepub fn try_into_i64(self) -> Result<NumbersI64<R>, Error>
pub fn try_into_i64(self) -> Result<NumbersI64<R>, Error>
Turns this into an i64
iterator, casting values.
Floating-point types will be rejected with Error::UnsafeCast
. Dates will become
days since the ‘1970-01-01’ epoch. Date-times will become microseconds since the
‘1970-01-01T00:00:00Z’ epoch.