Enum Boundaries

Source
pub enum Boundaries<R: ReadAt> {
    F32(GenericBoundaries<f32, R>),
    F64(GenericBoundaries<f64, R>),
    I64(GenericBoundaries<i64, R>),
    Date(GenericBoundaries<NaiveDate, R>),
    DateTime(GenericBoundaries<DateTime<Utc>, R>),
}
Expand description

Iterator for reading color data.

Casting is the same as Numbers.

Variants§

Implementations§

Source§

impl<R: ReadAt> Boundaries<R>

Source

pub fn try_into_f64(self) -> Result<BoundariesF64<R>, 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.

Source

pub fn try_into_i64(self) -> Result<BoundariesI64<R>, 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§

Source§

impl<R: Debug + ReadAt> Debug for Boundaries<R>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<R> !Freeze for Boundaries<R>

§

impl<R> !RefUnwindSafe for Boundaries<R>

§

impl<R> Send for Boundaries<R>

§

impl<R> !Sync for Boundaries<R>

§

impl<R> Unpin for Boundaries<R>

§

impl<R> !UnwindSafe for Boundaries<R>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.