#[repr(C)]pub struct RawCoordinateKey {
pub sort_key: u64,
}Expand description
Fixed-size coordinate sort key for raw BAM sorting (8 bytes).
This key is designed for efficient temp file storage and O(1) comparisons during merge phase. It packs:
sort_key: (tid << 34) | ((pos+1) << 1) | reverse
Note: No read name tie-breaking is used, matching samtools behavior. Equal records maintain their original input order (stable sort).
Fields§
§sort_key: u64Packed primary sort key: (tid << 34) | ((pos+1) << 1) | reverse.
Implementations§
Source§impl RawCoordinateKey
impl RawCoordinateKey
Sourcepub fn new(tid: i32, pos: i32, reverse: bool, nref: u32) -> Self
pub fn new(tid: i32, pos: i32, reverse: bool, nref: u32) -> Self
Create a new coordinate key from components.
§Arguments
tid- Reference sequence ID (-1 for unmapped)pos- 0-based alignment positionreverse- True if reverse complementednref- Number of reference sequences (for unmapped handling)
Trait Implementations§
Source§impl Clone for RawCoordinateKey
impl Clone for RawCoordinateKey
Source§fn clone(&self) -> RawCoordinateKey
fn clone(&self) -> RawCoordinateKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RawCoordinateKey
impl Debug for RawCoordinateKey
Source§impl Default for RawCoordinateKey
impl Default for RawCoordinateKey
Source§impl Ord for RawCoordinateKey
impl Ord for RawCoordinateKey
Source§impl PartialEq for RawCoordinateKey
impl PartialEq for RawCoordinateKey
Source§impl PartialOrd for RawCoordinateKey
impl PartialOrd for RawCoordinateKey
Source§impl RawSortKey for RawCoordinateKey
impl RawSortKey for RawCoordinateKey
Source§const SERIALIZED_SIZE: Option<usize>
const SERIALIZED_SIZE: Option<usize>
Fixed byte size when serialized, or
None for variable-length keys. Read moreSource§fn extract(bam: &[u8], ctx: &SortContext) -> Self
fn extract(bam: &[u8], ctx: &SortContext) -> Self
Extract a sort key from raw BAM record bytes. Read more
impl Copy for RawCoordinateKey
impl Eq for RawCoordinateKey
impl Pod for RawCoordinateKey
impl StructuralPartialEq for RawCoordinateKey
Auto Trait Implementations§
impl Freeze for RawCoordinateKey
impl RefUnwindSafe for RawCoordinateKey
impl Send for RawCoordinateKey
impl Sync for RawCoordinateKey
impl Unpin for RawCoordinateKey
impl UnsafeUnpin for RawCoordinateKey
impl UnwindSafe for RawCoordinateKey
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more