pub struct Builder<I> { /* private fields */ }
Expand description

A binning index builder.

Implementations§

source§

impl<I> Builder<I>
where I: Index,

source

pub fn set_min_shift(self, min_shift: u8) -> Self

Sets a min shift.

§Examples
use noodles_csi::{self as csi, BinningIndex};
let index = csi::Index::builder().set_min_shift(13).build();
assert_eq!(index.min_shift(), 13);
source

pub fn set_depth(self, depth: u8) -> Self

Sets a max depth.

§Examples
use noodles_csi::{self as csi, BinningIndex};
let index = csi::Index::builder().set_depth(8).build();
assert_eq!(index.depth(), 8);
source

pub fn set_header(self, header: Header) -> Self

Sets a tabix header.

§Examples
use noodles_csi::{self as csi, binning_index::index::Header, BinningIndex};
let header = Header::default();
let index = csi::Index::builder().set_header(header.clone()).build();
assert_eq!(index.header(), Some(&header));
source

pub fn set_reference_sequences( self, reference_sequences: Vec<ReferenceSequence<I>> ) -> Self

Sets reference sequences.

§Examples
use noodles_csi::{self as csi, binning_index::index::ReferenceSequence};

let reference_sequences = vec![ReferenceSequence::new(Default::default(), Default::default(), None)];
let index = csi::Index::builder()
    .set_reference_sequences(reference_sequences.clone())
    .build();

assert_eq!(index.reference_sequences(), &reference_sequences);
source

pub fn set_unplaced_unmapped_record_count( self, unplaced_unmapped_record_count: u64 ) -> Self

Sets an unplaced, unmapped record count.

§Examples
use noodles_csi::{self as csi, BinningIndex};
let index = csi::Index::builder().set_unplaced_unmapped_record_count(21).build();
assert_eq!(index.unplaced_unmapped_record_count(), Some(21));
source

pub fn build(self) -> Index<I>

Builds a binning index.

§Examples
use noodles_csi as csi;
let index = csi::Index::builder().build();

Trait Implementations§

source§

impl<I> Default for Builder<I>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<I> Freeze for Builder<I>

§

impl<I> RefUnwindSafe for Builder<I>
where I: RefUnwindSafe,

§

impl<I> Send for Builder<I>
where I: Send,

§

impl<I> Sync for Builder<I>
where I: Sync,

§

impl<I> Unpin for Builder<I>
where I: Unpin,

§

impl<I> UnwindSafe for Builder<I>
where I: UnwindSafe,

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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, U> TryFrom<U> for T
where U: Into<T>,

§

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

§

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<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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