pub enum ArgumentError {
TooFewArgs,
TooManyArgs,
InvalidKeywordArgument(String),
RequiredKeywordArgument(String),
Exception(PyBaseExceptionRef),
}
Expand description
An error encountered while binding arguments to the parameters of a Python function call.
Variants§
TooFewArgs
The call provided fewer positional arguments than the function requires.
TooManyArgs
The call provided more positional arguments than the function accepts.
InvalidKeywordArgument(String)
The function doesn’t accept a keyword argument with the given name.
RequiredKeywordArgument(String)
The function require a keyword argument with the given name, but one wasn’t provided
Exception(PyBaseExceptionRef)
An exception was raised while binding arguments to the function parameters.
Trait Implementations§
Source§impl From<PyRef<PyBaseException>> for ArgumentError
impl From<PyRef<PyBaseException>> for ArgumentError
Source§fn from(ex: PyBaseExceptionRef) -> Self
fn from(ex: PyBaseExceptionRef) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ArgumentError
impl !RefUnwindSafe for ArgumentError
impl !Send for ArgumentError
impl !Sync for ArgumentError
impl Unpin for ArgumentError
impl !UnwindSafe for ArgumentError
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> 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