pub enum SigParseError {
Syntax(String),
Duplicate(String),
}Expand description
Why an arglist / type-parameter list failed to parse. The two variants
carry sphinx’s two observable failure channels ([PY §1.3 step 5],
_object.py:355-381):
SigParseError::Syntax—ast.parseSyntaxError: task 6 logs at debug level (invisible) and falls back topseudo_parse_arglist; for a tp-list, any failure is a warning (_object.py:342-345).SigParseError::Duplicate—inspect.Signature’sValueError('duplicate parameter name: ...'): task 6 emits WARNINGcould not parse arglist (%r): %sand falls back to pseudo. Noteast.parseaccepts duplicatedefparameters (the check lives in the symtable pass), so this genuinely reachesSignature.__init__.
Variants§
Syntax(String)
A SyntaxError-equivalent; the message approximates CPython’s and
is only ever surfaced on the (warning) tp-list path.
Duplicate(String)
Duplicate parameter name (the payload is the offending name).
Trait Implementations§
Source§impl Clone for SigParseError
impl Clone for SigParseError
Source§fn clone(&self) -> SigParseError
fn clone(&self) -> SigParseError
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 SigParseError
impl Debug for SigParseError
Source§impl Display for SigParseError
impl Display for SigParseError
impl Eq for SigParseError
Source§impl Error for SigParseError
impl Error for SigParseError
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 SigParseError
impl PartialEq for SigParseError
impl StructuralPartialEq for SigParseError
Auto Trait Implementations§
impl Freeze for SigParseError
impl RefUnwindSafe for SigParseError
impl Send for SigParseError
impl Sync for SigParseError
impl Unpin for SigParseError
impl UnsafeUnpin for SigParseError
impl UnwindSafe for SigParseError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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