Struct SequenceText
pub struct SequenceText(/* private fields */);Expand description
Owned biological sequence text.
Implementations§
§impl SequenceText
impl SequenceText
pub fn new(value: impl AsRef<str>) -> Result<SequenceText, SequenceError>
pub fn new(value: impl AsRef<str>) -> Result<SequenceText, 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.
pub const fn empty() -> SequenceText
pub const fn empty() -> SequenceText
Creates explicitly empty sequence text.
Empty sequences are only produced through this constructor so callers can make that choice visible in code.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the sequence text and returns the owned string.
Trait Implementations§
§impl AsRef<str> for SequenceText
impl AsRef<str> for SequenceText
§impl Clone for SequenceText
impl Clone for SequenceText
§fn clone(&self) -> SequenceText
fn clone(&self) -> SequenceText
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 SequenceText
impl Debug for SequenceText
§impl Display for SequenceText
impl Display for SequenceText
§impl FromStr for SequenceText
impl FromStr for SequenceText
§type Err = SequenceError
type Err = SequenceError
The associated error which can be returned from parsing.
§fn from_str(value: &str) -> Result<SequenceText, <SequenceText as FromStr>::Err>
fn from_str(value: &str) -> Result<SequenceText, <SequenceText as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for SequenceText
impl Hash for SequenceText
§impl Ord for SequenceText
impl Ord for SequenceText
§impl PartialEq for SequenceText
impl PartialEq for SequenceText
§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