[−][src]Struct rust_htslib::bam::record::CigarString   
A CIGAR string. This type wraps around a Vec<Cigar>.
Example
use rust_htslib::bam::record::{Cigar, CigarString}; let cigar = CigarString(vec![Cigar::Match(100), Cigar::SoftClip(10)]); // access by index assert_eq!(cigar[0], Cigar::Match(100)); // format into classical string representation assert_eq!(format!("{}", cigar), "100M10S"); // iterate for op in &cigar { println!("{}", op); }
Implementations
impl CigarString[src]
pub fn into_view(self, pos: i64) -> CigarStringView[src]
Create a CigarStringView from this CigarString at position pos
pub fn from_alignment(alignment: &Alignment, hard_clip: bool) -> Self[src]
Calculate the bam cigar from the alignment struct. x is the target string
and y is the reference. hard_clip controls how unaligned read bases are encoded in the
cigar string. Set to true to use the hard clip (H) code, or false to use soft clip
(S) code. See the SAM spec for more details.
impl<'a> CigarString[src]
Trait Implementations
impl Clone for CigarString[src]
pub fn clone(&self) -> CigarString[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for CigarString[src]
impl Deref for CigarString[src]
type Target = Vec<Cigar>
The resulting type after dereferencing.
pub fn deref(&self) -> &Self::Target[src]
impl Display for CigarString[src]
impl Eq for CigarString[src]
impl From<CigarString> for Vec<Cigar>[src]
pub fn from(v: CigarString) -> Self[src]
impl From<Vec<Cigar, Global>> for CigarString[src]
impl Hash for CigarString[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher, 1.3.0[src]
H: Hasher,
impl Index<usize> for CigarString[src]
type Output = <Vec<Cigar> as Index<usize>>::Output
The returned type after indexing.
pub fn index(&self, index: usize) -> &Self::Output[src]
impl IndexMut<usize> for CigarString[src]
impl<'a> IntoIterator for &'a CigarString[src]
type Item = &'a Cigar
The type of the elements being iterated over.
type IntoIter = Iter<'a, Cigar>
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> Self::IntoIter[src]
impl PartialEq<CigarString> for CigarString[src]
pub fn eq(&self, other: &CigarString) -> bool[src]
pub fn ne(&self, other: &CigarString) -> bool[src]
impl PartialOrd<CigarString> for CigarString[src]
pub fn partial_cmp(&self, other: &CigarString) -> Option<Ordering>[src]
pub fn lt(&self, other: &CigarString) -> bool[src]
pub fn le(&self, other: &CigarString) -> bool[src]
pub fn gt(&self, other: &CigarString) -> bool[src]
pub fn ge(&self, other: &CigarString) -> bool[src]
impl StructuralEq for CigarString[src]
impl StructuralPartialEq for CigarString[src]
impl TryFrom<&'_ [u8]> for CigarString[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(text: &[u8]) -> Result<Self>[src]
Create a CigarString from given bytes.
impl TryFrom<&'_ str> for CigarString[src]
Auto Trait Implementations
impl RefUnwindSafe for CigarString[src]
impl Send for CigarString[src]
impl Sync for CigarString[src]
impl Unpin for CigarString[src]
impl UnwindSafe for CigarString[src]
Blanket Implementations
impl<T> Any for T where
    T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
    T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
    T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
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.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
    T: Display + ?Sized, [src]
T: Display + ?Sized,
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.
pub 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>,