Struct BioSequence
pub struct BioSequence { /* private fields */ }Expand description
Owned biological sequence data with a descriptive kind.
Implementations§
§impl BioSequence
impl BioSequence
pub fn new(
kind: SequenceKind,
text: impl AsRef<str>,
) -> Result<BioSequence, SequenceError>
pub fn new( kind: SequenceKind, text: impl AsRef<str>, ) -> Result<BioSequence, SequenceError>
Creates a biological sequence from non-empty owned text.
§Errors
Returns SequenceError::EmptyText when the supplied text is empty.
pub const fn empty(kind: SequenceKind) -> BioSequence
pub const fn empty(kind: SequenceKind) -> BioSequence
Creates an explicitly empty sequence with the given kind.
pub const fn kind(&self) -> &SequenceKind
pub const fn kind(&self) -> &SequenceKind
Returns the descriptive sequence kind.
pub const fn text(&self) -> &SequenceText
pub const fn text(&self) -> &SequenceText
Returns the owned sequence text wrapper.
pub fn sequence_length(&self) -> SequenceLength
pub fn sequence_length(&self) -> SequenceLength
Returns the sequence length wrapper.
Trait Implementations§
§impl Clone for BioSequence
impl Clone for BioSequence
§fn clone(&self) -> BioSequence
fn clone(&self) -> BioSequence
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for BioSequence
impl Debug for BioSequence
§impl PartialEq for BioSequence
impl PartialEq for BioSequence
impl Eq for BioSequence
impl StructuralPartialEq for BioSequence
Auto Trait Implementations§
impl Freeze for BioSequence
impl RefUnwindSafe for BioSequence
impl Send for BioSequence
impl Sync for BioSequence
impl Unpin for BioSequence
impl UnsafeUnpin for BioSequence
impl UnwindSafe for BioSequence
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