use super::ArgumentMatcher;
use crate::argument::Argument;
use std::fmt::Write;
use std::fmt::{self, Display};
impl Argument {
pub fn any(&self) -> AnyArgumentMatcher {
AnyArgumentMatcher
}
}
#[derive(Debug)]
pub struct AnyArgumentMatcher;
impl Display for AnyArgumentMatcher {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_char('*')
}
}
impl<'args, U> ArgumentMatcher<U> for AnyArgumentMatcher {
fn matches_argument(&self, _input: &U) -> bool {
true
}
}