#[non_exhaustive]pub enum ParamError {
TooMany,
OutOfOrder {
index: u16,
},
Unnamed {
index: u16,
},
DuplicateName {
index: u16,
},
RestDefault {
index: u16,
},
Signature {
index: u16,
},
}Expand description
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TooMany
More than 255 parameters, or more than 64 when a parameter has a default (the presence mask is 64 bits).
OutOfOrder
A parameter’s kind is out of the required order, or a second rest parameter of one rank appears.
Unnamed
A normal or named-only parameter has no name.
DuplicateName
Two parameters have the same name.
RestDefault
A rest parameter is marked as having a default.
Signature
The list does not fit the function’s signature: the signature must
have one parameter per entry, plus a trailing i64 presence mask
when an entry has a default; rest parameters are dyn; by-reference
parameters are dyn or a ref (to a cell dyn).
Trait Implementations§
Source§impl Clone for ParamError
impl Clone for ParamError
impl Copy for ParamError
Source§impl Debug for ParamError
impl Debug for ParamError
Source§impl Display for ParamError
impl Display for ParamError
impl Eq for ParamError
Source§impl Error for ParamError
impl Error for ParamError
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 ParamError
impl PartialEq for ParamError
impl StructuralPartialEq for ParamError
Auto Trait Implementations§
impl Freeze for ParamError
impl RefUnwindSafe for ParamError
impl Send for ParamError
impl Sync for ParamError
impl Unpin for ParamError
impl UnsafeUnpin for ParamError
impl UnwindSafe for ParamError
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