pub enum Bitpix {
F64 = -64,
F32 = -32,
U8 = 8,
I16 = 16,
I32 = 32,
}Expand description
The type of the values in an array, from its BITPIX card.
Variants§
F64 = -64
Float 64
F32 = -32
Float 32
U8 = 8
Unsigned 8 bit
I16 = 16
Signed 16 bit
I32 = 32
Signed 32 bit
Implementations§
Source§impl Bitpix
impl Bitpix
Sourcepub fn read_be(&self, bytes: &[u8]) -> Option<f64>
pub fn read_be(&self, bytes: &[u8]) -> Option<f64>
Decodes one big-endian array value from the front of bytes, widening it
to f64.
Returns None when bytes is shorter than Bitpix::byte_size, so a
truncated data section produces a short read rather than a panic.
Sourcepub fn value_range(&self) -> Option<(f64, f64)>
pub fn value_range(&self) -> Option<(f64, f64)>
The inclusive range of values this type can represent, as f64.
None for the floating point types, which have no meaningful full-scale
range to normalise against.
Trait Implementations§
impl Copy for Bitpix
impl StructuralPartialEq for Bitpix
Auto Trait Implementations§
impl Freeze for Bitpix
impl RefUnwindSafe for Bitpix
impl Send for Bitpix
impl Sync for Bitpix
impl Unpin for Bitpix
impl UnsafeUnpin for Bitpix
impl UnwindSafe for Bitpix
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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 more