pub struct Writer<W> where
    W: Write
{ /* private fields */ }
Expand description

A tabix writer.

Implementations

Creates a tabix writer.

Examples
use noodles_tabix as tabix;
let writer = tabix::Writer::new(Vec::new());

Returns a reference to the underlying writer.

Examples
use noodles_tabix as tabix;
let writer = tabix::Writer::new(Vec::new());
assert!(writer.get_ref().is_empty());

Attempts to finish the output stream.

This is typically only manually called if the underlying stream is needed before the writer is dropped.

Examples
use noodles_tabix as tabix;
let mut writer = tabix::Writer::new(Vec::new());
writer.try_finish()?;

Writes a tabix index.

Examples
use noodles_tabix as tabix;
let index = tabix::Index::default();
let mut writer = tabix::Writer::new(Vec::new());
writer.write_index(&index)?;

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more