Struct SerHeader

Source
pub struct SerHeader {
    pub image_height: u32,
    pub image_width: u32,
    pub frame_count: usize,
    pub pixel_depth_per_plane: u32,
    pub endianness: Endianness,
    pub bayer: Bayer,
    pub observer: String,
    pub telescope: String,
    pub instrument: String,
    pub date_time: u64,
    pub date_time_utc: u64,
}

Fields§

§image_height: u32

Image height, in pixels

§image_width: u32

Image width, in pixels

§frame_count: usize

Number of frames

§pixel_depth_per_plane: u32

Pixel depth per plane

§endianness: Endianness

Number of butes per pixel (1 or 2) The endianness of encoded image data. This is only relevant if the image data is 16-bit

§bayer: Bayer

Bayer encoding

§observer: String

Name of observer

§telescope: String

Name of telescope

§instrument: String

Name of instrument

§date_time: u64

File timestamp

§date_time_utc: u64

File timestamp in UTC

Implementations§

Source§

impl SerHeader

Source

pub fn image_data_bytes(&self) -> usize

Total number of image bytes in the file

Source

pub fn image_frame_size(&self) -> usize

Number of bytes per image frame

Source

pub fn bytes_per_pixel(&self) -> usize

Number of bytes per pixel (either 1 or 2)

Trait Implementations§

Source§

impl Debug for SerHeader

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.