pub struct AlignedSequence(/* private fields */);Expand description
A non-empty aligned sequence string that may contain gaps.
Implementations§
Source§impl AlignedSequence
impl AlignedSequence
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, AlignmentValueError>
pub fn new(value: impl AsRef<str>) -> Result<Self, AlignmentValueError>
Creates an aligned sequence from non-empty text.
§Errors
Returns AlignmentValueError::Empty when the trimmed text is empty.
Sourcepub fn aligned_len(&self) -> usize
pub fn aligned_len(&self) -> usize
Returns the number of Unicode scalar values in the aligned text.
Trait Implementations§
Source§impl Clone for AlignedSequence
impl Clone for AlignedSequence
Source§fn clone(&self) -> AlignedSequence
fn clone(&self) -> AlignedSequence
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 AlignedSequence
impl Debug for AlignedSequence
Source§impl Display for AlignedSequence
impl Display for AlignedSequence
Source§impl FromStr for AlignedSequence
impl FromStr for AlignedSequence
Source§impl Hash for AlignedSequence
impl Hash for AlignedSequence
Source§impl Ord for AlignedSequence
impl Ord for AlignedSequence
Source§fn cmp(&self, other: &AlignedSequence) -> Ordering
fn cmp(&self, other: &AlignedSequence) -> 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 AlignedSequence
impl PartialEq for AlignedSequence
Source§fn eq(&self, other: &AlignedSequence) -> bool
fn eq(&self, other: &AlignedSequence) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for AlignedSequence
impl PartialOrd for AlignedSequence
impl Eq for AlignedSequence
impl StructuralPartialEq for AlignedSequence
Auto Trait Implementations§
impl Freeze for AlignedSequence
impl RefUnwindSafe for AlignedSequence
impl Send for AlignedSequence
impl Sync for AlignedSequence
impl Unpin for AlignedSequence
impl UnsafeUnpin for AlignedSequence
impl UnwindSafe for AlignedSequence
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