Skip to main content

DryIceWriter

Struct DryIceWriter 

Source
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>

Source

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>

Source

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.

Source

pub fn options(&self) -> DryIceWriterOptions

Assemble the current configuration into an options struct.

Source

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>

Source

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.

Source

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>

Source

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>
where W: Send, K: Send, S: Send, Q: Send, N: Send,

§

impl<W, S, Q, N, K> Sync for DryIceWriter<W, S, Q, N, K>
where W: Sync, K: Sync, S: Sync, Q: Sync, N: Sync,

§

impl<W, S, Q, N, K> Unpin for DryIceWriter<W, S, Q, N, K>
where W: Unpin, K: Unpin, S: Unpin, Q: Unpin, N: Unpin,

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V