pub enum FetchDefinition<'a> {
    Region(i32i64i64),
    RegionString(&'a [u8], i64i64),
    CompleteTid(i32),
    String(&'a [u8]),
    All,
    Unmapped,
}
Expand description

Enum for IndexdReader.fetch() arguments.

tids may be converted From<>:

  • i32 (correct as per spec)
  • u32 (because of header.tid. Will panic if above 2^31-1).

Coordinates may be (via FetchCoordinate)

  • i32 (as of the sam v1 spec)
  • i64 (as of the htslib ‘large coordinate’ extension (even though they are not supported in BAM)
  • u32 (because that’s what rust literals will default to)
  • u64 (because of header.target_len(). Will panic if above 2^^63-1).

Variants

Region(i32i64i64)

tid, start, stop,

RegionString(&'a [u8], i64i64)

‘named-reference’, start, stop tuple.

CompleteTid(i32)

complete reference. May be i32 or u32 (which panics if above 2^31-’)

String(&'a [u8])

complete reference by name (&u8 or &str)

All

Every read

Unmapped

Only reads with the BAM flag BAM_FUNMAP (which might not be all reads with reference = -1)

Trait Implementations

Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.

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.

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.