Enum omf::data::Boundaries
source · pub enum Boundaries {
F32(GenericBoundaries<f32>),
F64(GenericBoundaries<f64>),
I64(GenericBoundaries<i64>),
Date(GenericBoundaries<NaiveDate>),
DateTime(GenericBoundaries<DateTime<Utc>>),
}
Expand description
Iterator for reading color data.
Casting is the same as Numbers
.
Variants§
F32(GenericBoundaries<f32>)
F64(GenericBoundaries<f64>)
I64(GenericBoundaries<i64>)
Date(GenericBoundaries<NaiveDate>)
DateTime(GenericBoundaries<DateTime<Utc>>)
Implementations§
source§impl Boundaries
impl Boundaries
sourcepub fn try_into_f64(self) -> Result<BoundariesF64, Error>
pub fn try_into_f64(self) -> Result<BoundariesF64, Error>
Turns this into an f64
boundary 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<BoundariesI64, Error>
pub fn try_into_i64(self) -> Result<BoundariesI64, Error>
Turns this into an i64
boundary 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.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Boundaries
impl !RefUnwindSafe for Boundaries
impl Send for Boundaries
impl !Sync for Boundaries
impl Unpin for Boundaries
impl !UnwindSafe for Boundaries
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
Mutably borrows from an owned value. Read more