pub struct RegionQuery {
pub contig: String,
pub start: Option<u64>,
pub end: Option<u64>,
}Expand description
A 0-based, half-open genomic region. User-facing, parsed from strings, may be partially specified.
Represents a query against a PBZ store. All coordinates follow BED conventions:
positions are 0-based and intervals are half-open [start, end).
Can be parsed from strings via FromStr / .parse():
use pbzarr::RegionQuery;
let r: RegionQuery = "chr1:1000-2000".parse().unwrap();
assert_eq!(r.contig, "chr1");
assert_eq!(r.start, Some(1000));
assert_eq!(r.end, Some(2000));Fields§
§contig: String§start: Option<u64>Start position (0-based, inclusive). None means start of contig.
end: Option<u64>End position (0-based, exclusive). None means end of contig.
Trait Implementations§
Source§impl Clone for RegionQuery
impl Clone for RegionQuery
Source§fn clone(&self) -> RegionQuery
fn clone(&self) -> RegionQuery
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 RegionQuery
impl Debug for RegionQuery
Source§impl Display for RegionQuery
impl Display for RegionQuery
impl Eq for RegionQuery
Source§impl FromStr for RegionQuery
impl FromStr for RegionQuery
Source§impl PartialEq for RegionQuery
impl PartialEq for RegionQuery
Source§fn eq(&self, other: &RegionQuery) -> bool
fn eq(&self, other: &RegionQuery) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RegionQuery
Auto Trait Implementations§
impl Freeze for RegionQuery
impl RefUnwindSafe for RegionQuery
impl Send for RegionQuery
impl Sync for RegionQuery
impl Unpin for RegionQuery
impl UnsafeUnpin for RegionQuery
impl UnwindSafe for RegionQuery
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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