pub struct WriteOptions { /* private fields */ }Expand description
Flags to alter the behavior of the writer
§Example
let opts = WriteOptions::new("My Awesome Astronomy Program")
.checksum_algorithm(Some(ChecksumAlgorithm::Sha3_512))
.compression_algorithm(Some((CompressionAlgorithm::Zlib, CompressionLevel::AUTO)));Implementations§
Source§impl WriteOptions
impl WriteOptions
Sourcepub fn new(app_name: impl Into<String>) -> Self
pub fn new(app_name: impl Into<String>) -> Self
Creates a new WriteOptions with the given app name,
and all other options set to their default values
Sourcepub fn app_name(&mut self, name: String) -> &mut Self
pub fn app_name(&mut self, name: String) -> &mut Self
Name of the application using this library
Sourcepub fn export_fits_keywords(&mut self, export: bool) -> &mut Self
pub fn export_fits_keywords(&mut self, export: bool) -> &mut Self
Write FITS headers as FITSKeyword elements in the XML header
Sourcepub fn checksum_algorithm(
&mut self,
alg: Option<ChecksumAlgorithm>,
) -> &mut Self
pub fn checksum_algorithm( &mut self, alg: Option<ChecksumAlgorithm>, ) -> &mut Self
Algorithm used for XISF data block checksum calculations
Sourcepub fn compression_algorithm(
&mut self,
alg: Option<(CompressionAlgorithm, CompressionLevel)>,
) -> &mut Self
pub fn compression_algorithm( &mut self, alg: Option<(CompressionAlgorithm, CompressionLevel)>, ) -> &mut Self
Algorithm used to compress XISF data blocks
Sourcepub fn fp_lower_bound(&mut self, low: f64) -> &mut Self
pub fn fp_lower_bound(&mut self, low: f64) -> &mut Self
Lower bound for floating-point pixel samples
Sourcepub fn fp_upper_bound(&mut self, high: f64) -> &mut Self
pub fn fp_upper_bound(&mut self, high: f64) -> &mut Self
Upper bound for floating-point pixel samples
Sourcepub fn block_alignment_size(&mut self, size: u16) -> &mut Self
pub fn block_alignment_size(&mut self, size: u16) -> &mut Self
Data blocks are allocated with block sizes of integer multiples of this value, in bytes
Sourcepub fn max_inline_block_size(&mut self, size: u16) -> &mut Self
pub fn max_inline_block_size(&mut self, size: u16) -> &mut Self
Max size (in bytes) that an XISF data block can be before it can no longer be inlined/embedded. Recommended value: 3/4 the size of block_alignment_size (or a multiple of it), since base64 takes 4 chars to encode 3 bytes. That is, a maximum-size inline data block can be base64-encoded into a buffer the same size as the block alignment size
Trait Implementations§
Source§impl Clone for WriteOptions
impl Clone for WriteOptions
Source§fn clone(&self) -> WriteOptions
fn clone(&self) -> WriteOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more