pub struct CubeWriter { /* private fields */ }Expand description
A streaming writer that holds an initialised output cube open for the lifetime
of a processing run, so channels can be written one at a time without the
per-call file open/close overhead of write_channel.
cfitsio drives a single file through one internal cursor and is not
thread-safe, so a CubeWriter must be owned and driven by a single thread
(the consumer end of the streaming pipeline in main).
Implementations§
Source§impl CubeWriter
impl CubeWriter
Sourcepub fn open(path: &Path) -> Result<Self, CubeError>
pub fn open(path: &Path) -> Result<Self, CubeError>
Open an already-initialised output cube (see init_output_cube) for
sequential channel writes.
Sourcepub fn write_channel_as<T: CubeElem>(
&mut self,
chan: usize,
data: &Array2<T>,
meta: &CubeMeta,
) -> Result<(), CubeError>
pub fn write_channel_as<T: CubeElem>( &mut self, chan: usize, data: &Array2<T>, meta: &CubeMeta, ) -> Result<(), CubeError>
Write one frequency channel plane (precision T) into the open cube.
Sourcepub fn write_channel(
&mut self,
chan: usize,
data: &Array2<f32>,
meta: &CubeMeta,
) -> Result<(), CubeError>
pub fn write_channel( &mut self, chan: usize, data: &Array2<f32>, meta: &CubeMeta, ) -> Result<(), CubeError>
Write one f32 frequency channel plane (see CubeWriter::write_channel_as).
Auto Trait Implementations§
impl !Send for CubeWriter
impl !Sync for CubeWriter
impl Freeze for CubeWriter
impl RefUnwindSafe for CubeWriter
impl Unpin for CubeWriter
impl UnsafeUnpin for CubeWriter
impl UnwindSafe for CubeWriter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more