pub struct StepArgsError { /* private fields */ }Expand description
Error returned when converting captured placeholder strings into a struct
annotated with #[derive(StepArgs)] fails.
Implementations§
Source§impl StepArgsError
impl StepArgsError
Sourcepub fn new(message: impl Into<String>) -> Self
pub fn new(message: impl Into<String>) -> Self
Construct a new error with the provided message.
Sourcepub fn parse_failure(field: &'static str, raw: &str) -> Self
pub fn parse_failure(field: &'static str, raw: &str) -> Self
Build an error describing a failed parse for field using raw.
Sourcepub fn count_mismatch(expected: usize, actual: usize) -> Self
pub fn count_mismatch(expected: usize, actual: usize) -> Self
Build an error describing a mismatch between expected and actual counts.
The derive macro validates capture counts at compile time, but the constructor remains available for manual implementations.
Trait Implementations§
Source§impl Clone for StepArgsError
impl Clone for StepArgsError
Source§fn clone(&self) -> StepArgsError
fn clone(&self) -> StepArgsError
Returns a duplicate of the value. Read more
1.0.0 · 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 StepArgsError
impl Debug for StepArgsError
Source§impl Display for StepArgsError
impl Display for StepArgsError
Source§impl Error for StepArgsError
impl Error for StepArgsError
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 StepArgsError
impl PartialEq for StepArgsError
impl Eq for StepArgsError
impl StructuralPartialEq for StepArgsError
Auto Trait Implementations§
impl Freeze for StepArgsError
impl RefUnwindSafe for StepArgsError
impl Send for StepArgsError
impl Sync for StepArgsError
impl Unpin for StepArgsError
impl UnwindSafe for StepArgsError
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.