[][src]Struct intspan::Range

pub struct Range { /* fields omitted */ }

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]

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]

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

impl Default for Range[src]

impl Clone for Range[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

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]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]