pub struct BuildMetadata(/* private fields */);Expand description
Parsed build metadata such as build.42.
Implementations§
Source§impl BuildMetadata
impl BuildMetadata
Sourcepub fn new(s: &str) -> Result<Self, SemverError>
pub fn new(s: &str) -> Result<Self, SemverError>
Parse build metadata such as build.42.
§Examples
use js_semver::BuildMetadata;
let build = BuildMetadata::new("build.42").unwrap();
assert_eq!(build.to_string(), "build.42");§Errors
Returns SemverError if s is not valid build metadata.
Trait Implementations§
Source§impl Clone for BuildMetadata
impl Clone for BuildMetadata
Source§fn clone(&self) -> BuildMetadata
fn clone(&self) -> BuildMetadata
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 BuildMetadata
impl Debug for BuildMetadata
Source§impl Default for BuildMetadata
impl Default for BuildMetadata
Source§fn default() -> BuildMetadata
fn default() -> BuildMetadata
Returns the “default value” for a type. Read more
Source§impl Display for BuildMetadata
impl Display for BuildMetadata
impl Eq for BuildMetadata
Source§impl FromStr for BuildMetadata
impl FromStr for BuildMetadata
Source§impl Ord for BuildMetadata
impl Ord for BuildMetadata
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for BuildMetadata
impl PartialEq for BuildMetadata
Source§impl PartialOrd for BuildMetadata
impl PartialOrd for BuildMetadata
impl StructuralPartialEq for BuildMetadata
Auto Trait Implementations§
impl Freeze for BuildMetadata
impl RefUnwindSafe for BuildMetadata
impl Send for BuildMetadata
impl Sync for BuildMetadata
impl Unpin for BuildMetadata
impl UnsafeUnpin for BuildMetadata
impl UnwindSafe for BuildMetadata
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