pub struct BioSequence { /* private fields */ }Expand description
Owned biological sequence data with a descriptive kind.
Implementations§
Source§impl BioSequence
impl BioSequence
Sourcepub fn new(
kind: SequenceKind,
text: impl AsRef<str>,
) -> Result<Self, SequenceError>
pub fn new( kind: SequenceKind, text: impl AsRef<str>, ) -> Result<Self, SequenceError>
Creates a biological sequence from non-empty owned text.
§Errors
Returns SequenceError::EmptyText when the supplied text is empty.
Sourcepub const fn empty(kind: SequenceKind) -> Self
pub const fn empty(kind: SequenceKind) -> Self
Creates an explicitly empty sequence with the given kind.
Sourcepub const fn kind(&self) -> &SequenceKind
pub const fn kind(&self) -> &SequenceKind
Returns the descriptive sequence kind.
Sourcepub const fn text(&self) -> &SequenceText
pub const fn text(&self) -> &SequenceText
Returns the owned sequence text wrapper.
Sourcepub fn sequence_length(&self) -> SequenceLength
pub fn sequence_length(&self) -> SequenceLength
Returns the sequence length wrapper.
Trait Implementations§
Source§impl Clone for BioSequence
impl Clone for BioSequence
Source§fn clone(&self) -> BioSequence
fn clone(&self) -> BioSequence
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BioSequence
impl Debug for BioSequence
Source§impl PartialEq for BioSequence
impl PartialEq for BioSequence
Source§fn eq(&self, other: &BioSequence) -> bool
fn eq(&self, other: &BioSequence) -> bool
Tests for
self and other values to be equal, and is used by ==.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