pub struct SemverError { /* private fields */ }Expand description
Error returned when a version or range string cannot be parsed.
§Examples
use js_semver::{SemverError, Version};
let err: SemverError = Version::parse("1.a.b").unwrap_err();
eprintln!("{err}");§Note
Do not depend on exact error message strings. The Display output is
intended for humans and may change between releases.
Trait Implementations§
Source§impl Clone for SemverError
impl Clone for SemverError
Source§fn clone(&self) -> SemverError
fn clone(&self) -> SemverError
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 SemverError
impl Debug for SemverError
Source§impl Display for SemverError
impl Display for SemverError
impl Eq for SemverError
Source§impl Error for SemverError
Available on crate feature std only.
impl Error for SemverError
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for SemverError
impl PartialEq for SemverError
impl StructuralPartialEq for SemverError
Auto Trait Implementations§
impl Freeze for SemverError
impl RefUnwindSafe for SemverError
impl Send for SemverError
impl Sync for SemverError
impl Unpin for SemverError
impl UnsafeUnpin for SemverError
impl UnwindSafe for SemverError
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