pub struct DryIceWriter<W, S: SequenceCodec = RawAsciiCodec, Q: QualityCodec = RawQualityCodec, N: NameCodec = RawNameCodec, K = NoRecordKey> { /* private fields */ }Expand description
Writes sequencing records into the dryice block-oriented format.
Implementations§
Source§impl DryIceWriter<MissingInner, RawAsciiCodec, RawQualityCodec, RawNameCodec, NoRecordKey>
impl DryIceWriter<MissingInner, RawAsciiCodec, RawQualityCodec, RawNameCodec, NoRecordKey>
Sourcepub fn builder() -> DryIceWriterBuilder<MissingInner, RawAsciiCodec, RawQualityCodec, RawNameCodec, NoRecordKey>
pub fn builder() -> DryIceWriterBuilder<MissingInner, RawAsciiCodec, RawQualityCodec, RawNameCodec, NoRecordKey>
Start building a new writer.
Source§impl<W: Write, S: SequenceCodec, Q: QualityCodec, N: NameCodec> DryIceWriter<W, S, Q, N, NoRecordKey>
impl<W: Write, S: SequenceCodec, Q: QualityCodec, N: NameCodec> DryIceWriter<W, S, Q, N, NoRecordKey>
Sourcepub fn from_options(
inner: W,
options: &DryIceWriterOptions,
) -> Result<Self, DryIceError>
pub fn from_options( inner: W, options: &DryIceWriterOptions, ) -> Result<Self, DryIceError>
Create an unkeyed writer from a pre-built options struct.
§Errors
Returns an error if the options request an unsupported block-size policy.
Sourcepub fn options(&self) -> DryIceWriterOptions
pub fn options(&self) -> DryIceWriterOptions
Assemble the current configuration into an options struct.
Sourcepub fn write_record<R: SeqRecordLike>(
&mut self,
record: &R,
) -> Result<(), DryIceError>
pub fn write_record<R: SeqRecordLike>( &mut self, record: &R, ) -> Result<(), DryIceError>
Write a single sequencing record to an unkeyed writer.
§Errors
Returns an error if the record fails validation, if the file header cannot be written, or if flushing the current block fails.
Source§impl<W: Write, S: SequenceCodec, Q: QualityCodec, N: NameCodec, K: RecordKey> DryIceWriter<W, S, Q, N, K>
impl<W: Write, S: SequenceCodec, Q: QualityCodec, N: NameCodec, K: RecordKey> DryIceWriter<W, S, Q, N, K>
Sourcepub fn write_record_with_key<R: SeqRecordLike>(
&mut self,
record: &R,
key: &K,
) -> Result<(), DryIceError>
pub fn write_record_with_key<R: SeqRecordLike>( &mut self, record: &R, key: &K, ) -> Result<(), DryIceError>
Write a single sequencing record together with its accelerator key.
§Errors
Returns an error if the record fails validation, if the key cannot be encoded, if the file header cannot be written, or if flushing the current block fails.
Sourcepub fn write_key_only(&mut self, key: &K) -> Result<(), DryIceError>
pub fn write_key_only(&mut self, key: &K) -> Result<(), DryIceError>
Write a key-only record with empty payload fields.
§Errors
Returns an error if the file header cannot be written, if the key cannot be encoded, or if flushing the current block fails.
Source§impl<W: Write, S: SequenceCodec, Q: QualityCodec, N: NameCodec, K> DryIceWriter<W, S, Q, N, K>
impl<W: Write, S: SequenceCodec, Q: QualityCodec, N: NameCodec, K> DryIceWriter<W, S, Q, N, K>
Sourcepub fn finish(self) -> Result<W, DryIceError>
pub fn finish(self) -> Result<W, DryIceError>
Flush any remaining buffered records and finalize the file.
§Errors
Returns an error if writing the file header or flushing the final block fails.
Auto Trait Implementations§
impl<W, S, Q, N, K> Freeze for DryIceWriter<W, S, Q, N, K>where
W: Freeze,
impl<W, S, Q, N, K> RefUnwindSafe for DryIceWriter<W, S, Q, N, K>
impl<W, S, Q, N, K> Send for DryIceWriter<W, S, Q, N, K>
impl<W, S, Q, N, K> Sync for DryIceWriter<W, S, Q, N, K>
impl<W, S, Q, N, K> Unpin for DryIceWriter<W, S, Q, N, K>
impl<W, S, Q, N, K> UnsafeUnpin for DryIceWriter<W, S, Q, N, K>where
W: UnsafeUnpin,
impl<W, S, Q, N, K> UnwindSafe for DryIceWriter<W, S, Q, N, K>
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
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>
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>
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