pub enum FetchDefinition<'a> {
Region(i32, i64, i64),
RegionString(&'a [u8], i64, i64),
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(i32, i64, i64)
tid, start, stop,
RegionString(&'a [u8], i64, i64)
‘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§
Source§impl<'a> Debug for FetchDefinition<'a>
impl<'a> Debug for FetchDefinition<'a>
Source§impl<'a> From<&'a [u8]> for FetchDefinition<'a>
impl<'a> From<&'a [u8]> for FetchDefinition<'a>
Source§fn from(s: &'a [u8]) -> FetchDefinition<'a>
fn from(s: &'a [u8]) -> FetchDefinition<'a>
Converts to this type from the input type.
Source§impl<'a, T: AsRef<[u8]>> From<&'a T> for FetchDefinition<'a>
impl<'a, T: AsRef<[u8]>> From<&'a T> for FetchDefinition<'a>
Source§fn from(s: &'a T) -> FetchDefinition<'a>
fn from(s: &'a T) -> FetchDefinition<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a str> for FetchDefinition<'a>
impl<'a> From<&'a str> for FetchDefinition<'a>
Source§fn from(s: &'a str) -> FetchDefinition<'a>
fn from(s: &'a str) -> FetchDefinition<'a>
Converts to this type from the input type.
Source§impl<'a, X: Into<FetchCoordinate>, Y: Into<FetchCoordinate>> From<(&'a [u8], X, Y)> for FetchDefinition<'a>
impl<'a, X: Into<FetchCoordinate>, Y: Into<FetchCoordinate>> From<(&'a [u8], X, Y)> for FetchDefinition<'a>
Source§fn from(tup: (&'a [u8], X, Y)) -> FetchDefinition<'a>
fn from(tup: (&'a [u8], X, Y)) -> FetchDefinition<'a>
Converts to this type from the input type.
Source§impl<'a, T: AsRef<[u8]>, X: Into<FetchCoordinate>, Y: Into<FetchCoordinate>> From<(&'a T, X, Y)> for FetchDefinition<'a>
impl<'a, T: AsRef<[u8]>, X: Into<FetchCoordinate>, Y: Into<FetchCoordinate>> From<(&'a T, X, Y)> for FetchDefinition<'a>
Source§fn from(tup: (&'a T, X, Y)) -> FetchDefinition<'a>
fn from(tup: (&'a T, X, Y)) -> FetchDefinition<'a>
Converts to this type from the input type.
Source§impl<'a, X: Into<FetchCoordinate>, Y: Into<FetchCoordinate>> From<(&'a str, X, Y)> for FetchDefinition<'a>
impl<'a, X: Into<FetchCoordinate>, Y: Into<FetchCoordinate>> From<(&'a str, X, Y)> for FetchDefinition<'a>
Source§fn from(tup: (&'a str, X, Y)) -> FetchDefinition<'a>
fn from(tup: (&'a str, X, Y)) -> FetchDefinition<'a>
Converts to this type from the input type.
Source§impl<'a, X: Into<FetchCoordinate>, Y: Into<FetchCoordinate>> From<(i32, X, Y)> for FetchDefinition<'a>
impl<'a, X: Into<FetchCoordinate>, Y: Into<FetchCoordinate>> From<(i32, X, Y)> for FetchDefinition<'a>
Source§fn from(tup: (i32, X, Y)) -> FetchDefinition<'a>
fn from(tup: (i32, X, Y)) -> FetchDefinition<'a>
Converts to this type from the input type.
Source§impl<'a, X: Into<FetchCoordinate>, Y: Into<FetchCoordinate>> From<(u32, X, Y)> for FetchDefinition<'a>
impl<'a, X: Into<FetchCoordinate>, Y: Into<FetchCoordinate>> From<(u32, X, Y)> for FetchDefinition<'a>
Source§fn from(tup: (u32, X, Y)) -> FetchDefinition<'a>
fn from(tup: (u32, X, Y)) -> FetchDefinition<'a>
Converts to this type from the input type.
Source§impl<'a> From<i32> for FetchDefinition<'a>
impl<'a> From<i32> for FetchDefinition<'a>
Source§fn from(tid: i32) -> FetchDefinition<'a>
fn from(tid: i32) -> FetchDefinition<'a>
Converts to this type from the input type.
Source§impl<'a> From<u32> for FetchDefinition<'a>
impl<'a> From<u32> for FetchDefinition<'a>
Source§fn from(tid: u32) -> FetchDefinition<'a>
fn from(tid: u32) -> FetchDefinition<'a>
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for FetchDefinition<'a>
impl<'a> RefUnwindSafe for FetchDefinition<'a>
impl<'a> Send for FetchDefinition<'a>
impl<'a> Sync for FetchDefinition<'a>
impl<'a> Unpin for FetchDefinition<'a>
impl<'a> UnwindSafe for FetchDefinition<'a>
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