pub enum SeqSrc<T> {
Query(T),
Reference(T),
}Expand description
An enum wrapping sequence data to indicate whether it represents a query sequence or a reference sequence.
Wrapping a sequence in SeqSrc is common for alignment algorithms in
Zoe, allowing the methods to know which sequence is the query and which is
the reference. There are multiple equivalent ways of creating a SeqSrc,
including wrapping a sequence directly and using an extension trait. For
example:
let seq = Nucleotides::from(b"AGTCGCTTGCATTTAC");
// Wrap a reference to the sequence
let wrapped1 = SeqSrc::Query(&seq);
let wrapped2 = seq.as_query_src();
assert_eq!(wrapped1, wrapped2);
// Wrap the owned sequence
let wrapped3 = SeqSrc::Query(seq.clone());
let wrapped4 = seq.into_query_src();
assert_eq!(wrapped3, wrapped4)Variants§
Implementations§
Trait Implementations§
impl<T: Copy> Copy for SeqSrc<T>
impl<T: Eq> Eq for SeqSrc<T>
impl<T: PartialEq> StructuralPartialEq for SeqSrc<T>
Auto Trait Implementations§
impl<T> Freeze for SeqSrc<T>where
T: Freeze,
impl<T> RefUnwindSafe for SeqSrc<T>where
T: RefUnwindSafe,
impl<T> Send for SeqSrc<T>where
T: Send,
impl<T> Sync for SeqSrc<T>where
T: Sync,
impl<T> Unpin for SeqSrc<T>where
T: Unpin,
impl<T> UnsafeUnpin for SeqSrc<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for SeqSrc<T>where
T: UnwindSafe,
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