pub struct BehaviorInferrer;Expand description
Behavior Inferrer - Infers CLI behavior patterns
Implementations§
Source§impl BehaviorInferrer
impl BehaviorInferrer
Sourcepub fn infer_no_args_behavior(&self, analysis: &CliAnalysis) -> NoArgsBehavior
pub fn infer_no_args_behavior(&self, analysis: &CliAnalysis) -> NoArgsBehavior
Infer CLI behavior when invoked without arguments
Uses multiple strategies in order of preference: 0. Check for known interactive tools (highest priority - must avoid execution)
- Execute binary and measure exit code (most accurate for non-interactive tools)
- Parse Usage line pattern for subcommand requirements
- Check for subcommands presence
- Default to ShowHelp (safest assumption)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BehaviorInferrer
impl RefUnwindSafe for BehaviorInferrer
impl Send for BehaviorInferrer
impl Sync for BehaviorInferrer
impl Unpin for BehaviorInferrer
impl UnwindSafe for BehaviorInferrer
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more