Enum node_semver::SemverErrorKind [−][src]
pub enum SemverErrorKind {
MaxLengthError,
IncompleteInput,
ParseIntError(ParseIntError),
MaxIntError(u64),
Context(&'static str),
NoValidRanges,
Other,
}
Expand description
The specific kind of error that occurred. Usually wrapped in a SemverError.
Variants
Semver strings overall can’t be longer than MAX_LENGTH. This is a
restriction coming from the JavaScript node-semver
.
Input to node-semver
must be “complete”. That is, a version must be
composed of major, minor, and patch segments, with optional prerelease
and build metadata. If you’re looking for alternative syntaxes, like 1.2
,
that are meant for defining semver ranges, use Range instead.
ParseIntError(ParseIntError)
Components of a semver string (major, minor, patch, integer sections of build and prerelease) must all be valid, parseable integers. This error occurs when Rust’s own integer parsing failed.
Tuple Fields of ParseIntError
MaxIntError(u64)
node-semver
inherits the JavaScript implementation’s limitation on
limiting integer component sizes to MAX_SAFE_INTEGER.
Tuple Fields of MaxIntError
0: u64
Context(&'static str)
This is a generic error that a certain component of the semver string failed to parse.
Tuple Fields of Context
0: &'static str
This error is mostly nondescript. Feel free to file an issue if you run into it.
Trait Implementations
Unique diagnostic code that can be used to look up more information
about this Diagnostic. Ideally also globally unique, and documented in
the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz
) is recommended, but more classic codes like
E0123
or Enums will work just fine. Read more
Additional help text related to this Diagnostic. Do you have any advice for the poor soul who’s just run into this issue? Read more
URL to visit for a more detailed explanation/help about this Diagnostic.
Diagnostic severity. This may be used by [ReportHandler]s to change the display format of this diagnostic. Read more
Source code to apply this Diagnostic’s Diagnostic::labels to.
Labels to apply to this Diagnostic’s Diagnostic::source_code
Additional related Diagnostics.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for SemverErrorKind
impl Send for SemverErrorKind
impl Sync for SemverErrorKind
impl Unpin for SemverErrorKind
impl UnwindSafe for SemverErrorKind
Blanket Implementations
Mutably borrows from an owned value. Read more