pub struct VersionLabel(/* private fields */);Implementations§
Source§impl VersionLabel
impl VersionLabel
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, ApiPrimitiveError>
pub fn new(value: impl AsRef<str>) -> Result<Self, ApiPrimitiveError>
Creates validated text metadata.
§Errors
Returns ApiPrimitiveError when the value is empty or contains control characters.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the value and returns the stored text.
Trait Implementations§
Source§impl AsRef<str> for VersionLabel
impl AsRef<str> for VersionLabel
Source§impl Clone for VersionLabel
impl Clone for VersionLabel
Source§fn clone(&self) -> VersionLabel
fn clone(&self) -> VersionLabel
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 VersionLabel
impl Debug for VersionLabel
Source§impl Display for VersionLabel
impl Display for VersionLabel
Source§impl FromStr for VersionLabel
impl FromStr for VersionLabel
Source§impl Hash for VersionLabel
impl Hash for VersionLabel
Source§impl Ord for VersionLabel
impl Ord for VersionLabel
Source§fn cmp(&self, other: &VersionLabel) -> Ordering
fn cmp(&self, other: &VersionLabel) -> 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 VersionLabel
impl PartialEq for VersionLabel
Source§fn eq(&self, other: &VersionLabel) -> bool
fn eq(&self, other: &VersionLabel) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for VersionLabel
impl PartialOrd for VersionLabel
Source§impl TryFrom<&str> for VersionLabel
impl TryFrom<&str> for VersionLabel
impl Eq for VersionLabel
impl StructuralPartialEq for VersionLabel
Auto Trait Implementations§
impl Freeze for VersionLabel
impl RefUnwindSafe for VersionLabel
impl Send for VersionLabel
impl Sync for VersionLabel
impl Unpin for VersionLabel
impl UnsafeUnpin for VersionLabel
impl UnwindSafe for VersionLabel
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