fits-io 0.1.1

A pure-Rust FITS file handling library inspired by CFITSIO, focused on safety, clarity, and performance.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::header::Header;

pub trait HDU {
    fn header(&self) -> &Header;
    fn header_mut(&mut self) -> &mut Header;

    /// Total size of this HDU in bytes. Including both header and data, and aligned to the Fits
    /// blocks.
    fn byte_size(&self) -> u64 {
        let header = self.header();
        (header.bytes_len() + header.data_block_len()) as u64
    }
}