Enum bpaf::ParseFailure
source · [−]Expand description
Unsuccessful command line parsing outcome, use it for unit tests
Useful for unit testing for user parsers, consume it with
ParseFailure::unwrap_stdout
and ParseFailure::unwrap_stdout
Variants
Stdout(String)
Print this to stdout and exit with success code
Stderr(String)
Print this to stderr and exit with failure code
Implementations
sourceimpl ParseFailure
impl ParseFailure
sourcepub fn unwrap_stderr(self) -> String
pub fn unwrap_stderr(self) -> String
sourcepub fn unwrap_stdout(self) -> String
pub fn unwrap_stdout(self) -> String
Trait Implementations
sourceimpl Clone for ParseFailure
impl Clone for ParseFailure
sourcefn clone(&self) -> ParseFailure
fn clone(&self) -> ParseFailure
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for ParseFailure
impl Send for ParseFailure
impl Sync for ParseFailure
impl Unpin for ParseFailure
impl UnwindSafe for ParseFailure
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more