Struct node_semver::SemverError[][src]

pub struct SemverError { /* fields omitted */ }
Expand description

Semver version or range parsing error wrapper.

This wrapper is used to hold some parsing-related metadata, as well as a more specific SemverErrorKind.

Implementations

Returns the input that was given to the parser.

Returns the SourceSpan of the error.

Returns the (0-based) byte offset where the parsing error happened.

Returns the more specific SemverErrorKind for this error.

This value can also be fetched through std::error::Error::source, but that would require downcasting to match types.

Returns the (0-indexed) line and column number where the parsing error happened.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Diagnostic severity. This may be used by [ReportHandler]s to change the display format of this diagnostic. 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.

Source code to apply this Diagnostic’s Diagnostic::labels to.

Labels to apply to this Diagnostic’s Diagnostic::source_code

Additional related Diagnostics.

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.