Struct fitsio::fitsfile::NewFitsFile
[−]
[src]
pub struct NewFitsFile<'a, T> where
T: AsRef<Path>, { /* fields omitted */ }
New fits file representation
This is a temporary struct, which describes how the primary HDU of a new file should be created. It uses the builder pattern.
The with_custom_primary
method allows for creation of a
custom primary HDU.
use fitsio::FitsFile; // let filename = ...; let description = ImageDescription { data_type: ImageType::Double, dimensions: &[52, 103], }; let fptr = FitsFile::create(filename) .with_custom_primary(&description) .open() .unwrap();
The open
method actually creates a Result<FitsFile>
from this
temporary representation.
use fitsio::FitsFile; // let filename = ...; let fptr = FitsFile::create(filename).open().unwrap();
Methods
impl<'a, T> NewFitsFile<'a, T> where
T: AsRef<Path>,
[src]
T: AsRef<Path>,
pub fn open(self) -> Result<FitsFile>
[src]
Create a Result<FitsFile>
from a temporary NewFitsFile
representation.
pub fn with_custom_primary(self, description: &ImageDescription<'a>) -> Self
[src]
When creating a new file, add a custom primary HDU description before creating the
FitsFile
object.
Trait Implementations
Auto Trait Implementations
impl<'a, T> Send for NewFitsFile<'a, T> where
T: Send,
T: Send,
impl<'a, T> Sync for NewFitsFile<'a, T> where
T: Sync,
T: Sync,