pub enum InteractivityMode {
Interactive,
NonInteractive,
}Expand description
Interactivity mode for a CLI invocation.
Commands and middleware can inspect this to decide whether to prompt for missing inputs, display progress spinners, or fall back to error messages suitable for scripts and CI.
Variants§
Interactive
The user explicitly requested interactive prompts (--interactive), or
the process is running in a TTY without CI indicators.
NonInteractive
The user explicitly disabled prompts (--non-interactive), or the
process is running in a non-TTY / CI context.
Implementations§
Source§impl InteractivityMode
impl InteractivityMode
Sourcepub fn is_interactive(self) -> bool
pub fn is_interactive(self) -> bool
Returns true when prompts and interactive flows are appropriate.
Trait Implementations§
Source§impl Clone for InteractivityMode
impl Clone for InteractivityMode
Source§fn clone(&self) -> InteractivityMode
fn clone(&self) -> InteractivityMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InteractivityMode
Source§impl Debug for InteractivityMode
impl Debug for InteractivityMode
impl Eq for InteractivityMode
Source§impl From<bool> for InteractivityMode
impl From<bool> for InteractivityMode
Source§impl PartialEq for InteractivityMode
impl PartialEq for InteractivityMode
impl StructuralPartialEq for InteractivityMode
Auto Trait Implementations§
impl Freeze for InteractivityMode
impl RefUnwindSafe for InteractivityMode
impl Send for InteractivityMode
impl Sync for InteractivityMode
impl Unpin for InteractivityMode
impl UnsafeUnpin for InteractivityMode
impl UnwindSafe for InteractivityMode
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§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.