[−][src]Struct intspan::Range
Methods
impl Range
[src]
pub fn name(&self) -> &String
[src]
pub fn chr(&self) -> &String
[src]
pub fn strand(&self) -> &String
[src]
pub fn start(&self) -> &i32
[src]
pub fn end(&self) -> &i32
[src]
pub fn strand_mut(&mut self) -> &mut String
[src]
pub fn new() -> Self
[src]
pub fn from<S>(chr: S, start: i32, end: i32) -> Self where
S: Into<String>,
[src]
S: Into<String>,
Constructed from chr, start and end
let range = Range::from("I", 1, 100);
pub fn from_str<S>(range: S) -> Self where
S: Into<String>,
[src]
S: Into<String>,
Constructed from string
let range = Range::from_str("I:1-100"); let range = Range::from_str("I:100"); let range = Range::from_str("S288c.I(-):27070-29557");
pub fn to_string(&self) -> String
[src]
To string
let range = Range::from("I", 1, 100); assert_eq!(range.to_string(), "I:1-100"); let range = Range::from("I", 100, 100); assert_eq!(range.to_string(), "I:100");
pub fn is_valid(&self) -> bool
[src]
Valid or not
let range = Range::from("I", 1, 100); assert!(range.is_valid()); let range = Range::from_str("I:100"); assert!(range.is_valid()); let range = Range::from_str("invalid"); assert!(!range.is_valid());
pub fn intspan(&self) -> IntSpan
[src]
IntSpan
let range = Range::from("I", 1, 100); assert_eq!(range.intspan().to_string(), "1-100"); let range = Range::from_str("I:100"); assert_eq!(range.intspan().to_string(), "100");
Trait Implementations
Auto Trait Implementations
impl Send for Range
impl Unpin for Range
impl Sync for Range
impl UnwindSafe for Range
impl RefUnwindSafe for Range
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,