pub struct Identifiers(/* private fields */);Expand description
Dot-separated identifiers (a pre-release or a build), stored as written.
Empty when the version has none. Short lists (up to 22 bytes, which covers
rc.1, beta.4, next.12, …) are stored inline without allocating;
identifiers are produced on demand.
Implementations§
Source§impl Identifiers
impl Identifiers
Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
The identifiers as written, joined by . (empty when there are none).
Sourcepub fn iter(&self) -> impl Iterator<Item = Identifier<'_>> + '_
pub fn iter(&self) -> impl Iterator<Item = Identifier<'_>> + '_
The identifiers in order.
Sourcepub fn starts_with(&self, prefix: &Identifiers) -> bool
pub fn starts_with(&self, prefix: &Identifiers) -> bool
True if prefix’s identifiers are a prefix of these (identifier-wise:
rc is a prefix of rc.1 but not of rc1).
Trait Implementations§
Source§impl Clone for Identifiers
impl Clone for Identifiers
Source§impl Debug for Identifiers
impl Debug for Identifiers
Source§impl Default for Identifiers
impl Default for Identifiers
Source§impl Display for Identifiers
impl Display for Identifiers
impl Eq for Identifiers
Source§impl Hash for Identifiers
impl Hash for Identifiers
Auto Trait Implementations§
impl Forget for Identifiers
impl Freeze for Identifiers
impl Move for Identifiers
impl RefUnwindSafe for Identifiers
impl Send for Identifiers
impl Sync for Identifiers
impl Unpin for Identifiers
impl UnsafeUnpin for Identifiers
impl UnwindSafe for Identifiers
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