[−][src]Struct fitrs::Hdu
Represent an HDU as defined in FITS standard 4.1.
Methods
impl Hdu
[src]
pub fn value(&self, key: &str) -> Option<&HeaderValue>
[src]
Get HeaderValue
by key. Return None
if value is not found
in Hdu
.
pub fn read_data(&self) -> FitsData
[src]
Get data array stored in the Hdu
.
impl Hdu
[src]
impl Hdu
[src]
pub fn new<T: FitsDataType>(shape: &[usize], data: Vec<T>) -> Hdu
[src]
Create a new HDU with the shape and data given as parameters.
The HDU must be added to a Fits
object to be written persistently
to disk.
pub fn empty() -> Hdu
[src]
Make an Hdu with an empty data array.
pub fn insert<K: Into<String>, V: Into<HeaderValue>>(
&mut self,
key: K,
value: V
)
[src]
&mut self,
key: K,
value: V
)
Insert a value into header.
FITS file is saved with the header in the order of insertion. Keys longer than 8 bytes are truncated on writing to disk.
Example
use fitrs::{Hdu}; let mut hdu = Hdu::empty(); hdu.insert("KEYSTR", "My string"); hdu.insert("KEYSTR2", "Strings longer than 68 characters are supported as well, following the continued string convention."); hdu.insert("KEYFLOAT", 3.14); hdu.insert("KEYINT", 42);
Trait Implementations
impl<'a> IntoIterator for &'a Hdu
[src]
type Item = <HduIter<'a> as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = HduIter<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl Clone for Hdu
[src]
impl Debug for Hdu
[src]
Auto Trait Implementations
impl Send for Hdu
impl Sync for Hdu
impl Unpin for Hdu
impl UnwindSafe for Hdu
impl RefUnwindSafe for Hdu
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,