fn cmp(&self, arg: &str) -> Ordering {
        match self {
            &ArgInfo::TakeArg(s, _, ArgDisposition::CanBeSeparated(None)) |
            &ArgInfo::TakeArg(s, _, ArgDisposition::Concatenated(None)) if arg.starts_with(s) => {
                Ordering::Equal
            }
            &ArgInfo::TakeArg(s, _, ArgDisposition::CanBeSeparated(Some(d))) |
            &ArgInfo::TakeArg(s, _, ArgDisposition::Concatenated(Some(d)))
                if arg.len() > s.len() && arg.starts_with(s) => arg.as_bytes()[s.len()].cmp(&d),
            _ => self.as_str().cmp(arg),
        }
    }
/// Returns whether the given string matches the argument description, and if not,
/// how it differs.
Returns whether the given string matches the argument description, and if not,
how it differs.
Returns whether the given string matches the argument description and if not how it differs .
fn cmp(&self, arg: &str) -> Ordering {
        match self {
            &ArgInfo::TakeArg(s, _, ArgDisposition::CanBeSeparated(None)) |
            &ArgInfo::TakeArg(s, _, ArgDisposition::Concatenated(None)) if arg.starts_with(s) => {
                Ordering::Equal
            }
            &ArgInfo::TakeArg(s, _, ArgDisposition::CanBeSeparated(Some(d))) |
            &ArgInfo::TakeArg(s, _, ArgDisposition::Concatenated(Some(d)))
                if arg.len() > s.len() && arg.starts_with(s) => arg.as_bytes()[s.len()].cmp(&d),
            _ => self.as_str().cmp(arg),
        }
    }
fn cmp ( & self , arg : & str ) -> Ordering { match self { & ArgInfo :: TakeArg ( s , _ , ArgDisposition :: CanBeSeparated ( None ) ) | & ArgInfo :: TakeArg ( s , _ , ArgDisposition :: Concatenated ( None ) ) if arg . starts_with ( s ) => { Ordering :: Equal } & ArgInfo :: TakeArg ( s , _ , ArgDisposition :: CanBeSeparated ( Some ( d ) ) ) | & ArgInfo :: TakeArg ( s , _ , ArgDisposition :: Concatenated ( Some ( d ) ) ) if arg . len ( ) > s . len ( ) && arg . starts_with ( s ) => arg . as_bytes ( ) [ s . len ( ) ] . cmp ( & d ) , _ => self . as_str ( ) . cmp ( arg ) , } }
Returns whether the given string matches the argument description, and if not,
how it differs.
Returns whether the given string matches the argument description and if not how it differs .
&self
arg
&str