pub struct SequenceText(/* private fields */);Expand description
Owned biological sequence text.
Implementations§
Source§impl SequenceText
impl SequenceText
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, SequenceError>
pub fn new(value: impl AsRef<str>) -> Result<Self, SequenceError>
Creates sequence text from a non-empty string.
The text is stored exactly as supplied. Casing is not normalized.
§Errors
Returns SequenceError::EmptyText when the supplied text is empty.
Sourcepub const fn empty() -> Self
pub const fn empty() -> Self
Creates explicitly empty sequence text.
Empty sequences are only produced through this constructor so callers can make that choice visible in code.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the sequence text and returns the owned string.
Trait Implementations§
Source§impl AsRef<str> for SequenceText
impl AsRef<str> for SequenceText
Source§impl Clone for SequenceText
impl Clone for SequenceText
Source§fn clone(&self) -> SequenceText
fn clone(&self) -> SequenceText
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 SequenceText
impl Debug for SequenceText
Source§impl Display for SequenceText
impl Display for SequenceText
Source§impl FromStr for SequenceText
impl FromStr for SequenceText
Source§impl Hash for SequenceText
impl Hash for SequenceText
Source§impl Ord for SequenceText
impl Ord for SequenceText
Source§fn cmp(&self, other: &SequenceText) -> Ordering
fn cmp(&self, other: &SequenceText) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SequenceText
impl PartialEq for SequenceText
Source§fn eq(&self, other: &SequenceText) -> bool
fn eq(&self, other: &SequenceText) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SequenceText
impl PartialOrd for SequenceText
impl Eq for SequenceText
impl StructuralPartialEq for SequenceText
Auto Trait Implementations§
impl Freeze for SequenceText
impl RefUnwindSafe for SequenceText
impl Send for SequenceText
impl Sync for SequenceText
impl Unpin for SequenceText
impl UnsafeUnpin for SequenceText
impl UnwindSafe for SequenceText
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