Struct noodles_bgzf::async::writer::Builder
source · pub struct Builder { /* private fields */ }
Expand description
An async BGZF writer builder.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_compression_level(self, compression_level: CompressionLevel) -> Self
pub fn set_compression_level(self, compression_level: CompressionLevel) -> Self
Sets a compression level.
By default, the compression level is set to level 6.
§Examples
use noodles_bgzf::{self as bgzf, writer::CompressionLevel};
let builder = bgzf::r#async::writer::Builder::default()
.set_compression_level(CompressionLevel::best());
sourcepub fn set_worker_count(self, worker_count: NonZeroUsize) -> Self
pub fn set_worker_count(self, worker_count: NonZeroUsize) -> Self
Sets a worker count.
By default, the worker count is set to the number of available logical CPUs.
§Examples
use std::num::NonZeroUsize;
use noodles_bgzf as bgzf;
let builder = bgzf::r#async::writer::Builder::default()
.set_worker_count(NonZeroUsize::MIN);
sourcepub fn build_from_writer<W>(self, writer: W) -> Writer<W>where
W: AsyncWrite,
pub fn build_from_writer<W>(self, writer: W) -> Writer<W>where
W: AsyncWrite,
Builds an async BGZF writer from a writer.
§Examples
use noodles_bgzf as bgzf;
let writer = bgzf::r#async::writer::Builder::default()
.build_from_writer(io::sink());
sourcepub fn build_with_writer<W>(self, writer: W) -> Writer<W>where
W: AsyncWrite,
👎Deprecated since 0.33.0: Use Builder::build_from_writer
instead.
pub fn build_with_writer<W>(self, writer: W) -> Writer<W>where
W: AsyncWrite,
Builder::build_from_writer
instead.Builds an async BGZF writer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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