#[non_exhaustive]pub enum PypiError {
TomlParseError {
message: String,
},
InvalidDependencySpec {
source: Pep508Error,
},
UnsupportedFormat {
message: String,
},
RequirementTooLong {
len: usize,
max: usize,
},
}Expand description
Errors specific to PyPI/Python dependency handling.
These errors cover parsing pyproject.toml files and validating PEP 508
dependency specifications. Registry communication errors are reported as
deps_core::DepsError directly (see crate::registry).
#[non_exhaustive] (matching crate::types::PypiDependencySection):
this enum grows as new parse-failure modes are distinguished (e.g.
PypiError::RequirementTooLong, added without a matching
cargo-semver-checks gate), so an external exhaustive match must not
be able to break on a future addition.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TomlParseError
Failed to parse pyproject.toml
InvalidDependencySpec
Invalid PEP 508 dependency specification
Fields
source: Pep508ErrorUnsupportedFormat
Unsupported dependency format
RequirementTooLong
PEP 508 requirement string exceeded the length cap protecting against
pep508_rs’s O(n²) extras-list parser (see
crate::parser::MAX_REQUIREMENT_LEN). Kept as a distinct variant
(rather than folded into UnsupportedFormat) so callers can tell a
deliberate length rejection apart from a genuine syntax error — the
two must be counted differently by heuristics like the
requirements.txt “is this really a manifest” signal.
Implementations§
Trait Implementations§
Source§impl Error for PypiError
impl Error for PypiError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for PypiError
impl !UnwindSafe for PypiError
impl Freeze for PypiError
impl Send for PypiError
impl Sync for PypiError
impl Unpin for PypiError
impl UnsafeUnpin for PypiError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more