pub struct Slow5WriteHandle { /* private fields */ }Expand description
Cloneable write handle for ParallelSlow5Writer.
Obtain one from ParallelSlow5Writer::write_handle and clone it for each
rayon worker (or any thread). Calling write() compresses on the calling thread
and enqueues the payload for the background I/O thread. Blocks under backpressure.
Drop all handles before calling ParallelSlow5Writer::finish.
§Examples
use slow5lib::{Slow5WriteHandle, writer::ParallelSlow5Writer};
use slow5lib::header::{Header, RecordCompression, SignalCompression, ReadGroup};
use slow5lib::aux::AuxMeta;
let header = Header {
version: (0, 2, 0),
num_read_groups: 1,
record_compression: RecordCompression::Zstd,
signal_compression: SignalCompression::SvbZd,
read_groups: vec![ReadGroup::default()],
aux_meta: AuxMeta::default(),
};
let par_writer = ParallelSlow5Writer::create("out.blow5", header, 32)?;
let handle = par_writer.write_handle();
// handle.write(&rec)?;
drop(handle);
par_writer.finish()?;Implementations§
Trait Implementations§
Source§impl Clone for Slow5WriteHandle
impl Clone for Slow5WriteHandle
Source§fn clone(&self) -> Slow5WriteHandle
fn clone(&self) -> Slow5WriteHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Slow5WriteHandle
impl RefUnwindSafe for Slow5WriteHandle
impl Send for Slow5WriteHandle
impl Sync for Slow5WriteHandle
impl Unpin for Slow5WriteHandle
impl UnsafeUnpin for Slow5WriteHandle
impl UnwindSafe for Slow5WriteHandle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more