pub enum ReqStrand {
Forward,
Reverse,
}Expand description
Strand information for annotations that require a strand.
Variants
Forward
Reverse
Implementations
sourceimpl ReqStrand
impl ReqStrand
sourcepub fn from_char(strand_char: &char) -> Result<ReqStrand, StrandError>
pub fn from_char(strand_char: &char) -> Result<ReqStrand, StrandError>
Returns a ReqStrand enum representing the given char.
The mapping is as follows:
* ‘+’, ‘f’, or ‘F’ becomes Strand::Forward
* ‘-’, ‘r’, or ‘R’ becomes Strand::Reverse
* Any other inputs will return an Err(StrandError::InvalidChar)
sourcepub fn strand_symbol(&self) -> &str
pub fn strand_symbol(&self) -> &str
Symbol denoting the strand. By convention, in BED and GFF
files, the forward strand is + and the reverse strand is -.
sourcepub fn on_strand<T>(&self, x: T) -> T where
T: Neg<Output = T>,
pub fn on_strand<T>(&self, x: T) -> T where
T: Neg<Output = T>,
Convert the (optional) strand of some other annotation
according to this strand. That is, reverse the strand of the
other annotation for ReqStrand::Reverse and leave it
unchanged for ReqStrand::Forward.
Arguments
xis the strand information from some other annotation.
use bio_types::strand::{ReqStrand,Strand};
assert_eq!(ReqStrand::Forward.on_strand(Strand::Reverse),
ReqStrand::Reverse.on_strand(Strand::Forward));Trait Implementations
sourceimpl Ord for ReqStrand
impl Ord for ReqStrand
sourceimpl PartialOrd<ReqStrand> for ReqStrand
impl PartialOrd<ReqStrand> for ReqStrand
sourcefn partial_cmp(&self, other: &ReqStrand) -> Option<Ordering>
fn partial_cmp(&self, other: &ReqStrand) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for ReqStrand
impl Eq for ReqStrand
impl StructuralEq for ReqStrand
impl StructuralPartialEq for ReqStrand
Auto Trait Implementations
impl RefUnwindSafe for ReqStrand
impl Send for ReqStrand
impl Sync for ReqStrand
impl Unpin for ReqStrand
impl UnwindSafe for ReqStrand
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more