pub struct SequenceId(/* private fields */);Expand description
A non-empty sequence identifier.
Implementations§
Source§impl SequenceId
impl SequenceId
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, SequenceIdError>
pub fn new(value: impl AsRef<str>) -> Result<Self, SequenceIdError>
Creates a sequence identifier from non-empty text.
Casing and punctuation are preserved exactly as supplied.
§Errors
Returns SequenceIdError::Empty when the trimmed identifier is empty.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the identifier and returns the owned string.
Trait Implementations§
Source§impl AsRef<str> for SequenceId
impl AsRef<str> for SequenceId
Source§impl Clone for SequenceId
impl Clone for SequenceId
Source§fn clone(&self) -> SequenceId
fn clone(&self) -> SequenceId
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 SequenceId
impl Debug for SequenceId
Source§impl Display for SequenceId
impl Display for SequenceId
Source§impl FromStr for SequenceId
impl FromStr for SequenceId
Source§impl Hash for SequenceId
impl Hash for SequenceId
Source§impl Ord for SequenceId
impl Ord for SequenceId
Source§fn cmp(&self, other: &SequenceId) -> Ordering
fn cmp(&self, other: &SequenceId) -> 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 SequenceId
impl PartialEq for SequenceId
Source§fn eq(&self, other: &SequenceId) -> bool
fn eq(&self, other: &SequenceId) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SequenceId
impl PartialOrd for SequenceId
impl Eq for SequenceId
impl StructuralPartialEq for SequenceId
Auto Trait Implementations§
impl Freeze for SequenceId
impl RefUnwindSafe for SequenceId
impl Send for SequenceId
impl Sync for SequenceId
impl Unpin for SequenceId
impl UnsafeUnpin for SequenceId
impl UnwindSafe for SequenceId
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