pub struct GenomicRange { /* private fields */ }Expand description
A genomic interval with explicit coordinate assumptions.
Implementations§
Source§impl GenomicRange
impl GenomicRange
Sourcepub fn new(
start: GenomicPosition,
end: GenomicPosition,
) -> Result<Self, GenomicRangeError>
pub fn new( start: GenomicPosition, end: GenomicPosition, ) -> Result<Self, GenomicRangeError>
Creates a genomic range using zero-based half-open coordinates and unstranded orientation.
§Errors
Returns GenomicRangeError::EndBeforeStart when end < start.
Sourcepub const fn with_strand(self, strand: Strand) -> Self
pub const fn with_strand(self, strand: Strand) -> Self
Sets the strand without changing positions.
Sourcepub fn with_coordinate_system(self, coordinate_system: CoordinateSystem) -> Self
pub fn with_coordinate_system(self, coordinate_system: CoordinateSystem) -> Self
Sets the coordinate system without converting positions.
Sourcepub const fn start(&self) -> GenomicPosition
pub const fn start(&self) -> GenomicPosition
Returns the start position.
Sourcepub const fn end(&self) -> GenomicPosition
pub const fn end(&self) -> GenomicPosition
Returns the end position.
Sourcepub const fn coordinate_system(&self) -> &CoordinateSystem
pub const fn coordinate_system(&self) -> &CoordinateSystem
Returns the coordinate system.
Trait Implementations§
Source§impl Clone for GenomicRange
impl Clone for GenomicRange
Source§fn clone(&self) -> GenomicRange
fn clone(&self) -> GenomicRange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GenomicRange
impl Debug for GenomicRange
Source§impl PartialEq for GenomicRange
impl PartialEq for GenomicRange
Source§fn eq(&self, other: &GenomicRange) -> bool
fn eq(&self, other: &GenomicRange) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for GenomicRange
impl StructuralPartialEq for GenomicRange
Auto Trait Implementations§
impl Freeze for GenomicRange
impl RefUnwindSafe for GenomicRange
impl Send for GenomicRange
impl Sync for GenomicRange
impl Unpin for GenomicRange
impl UnsafeUnpin for GenomicRange
impl UnwindSafe for GenomicRange
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