pub struct Interactive;
Expand description
Interactive utilities with fuzzy search capabilities
Implementations§
Source§impl Interactive
impl Interactive
Sourcepub fn is_interactive() -> bool
pub fn is_interactive() -> bool
Check if we’re running in an interactive environment
Sourcepub fn fuzzy_select<T: AsRef<str> + Clone + ToString>(
items: &[T],
prompt: &str,
default: Option<usize>,
) -> Result<T>
pub fn fuzzy_select<T: AsRef<str> + Clone + ToString>( items: &[T], prompt: &str, default: Option<usize>, ) -> Result<T>
Show a fuzzy-searchable selection menu
Sourcepub fn branch_picker(
branches: &[String],
prompt: Option<&str>,
) -> Result<String>
pub fn branch_picker( branches: &[String], prompt: Option<&str>, ) -> Result<String>
Show an enhanced branch picker with fuzzy search
Sourcepub fn text_input(
prompt: &str,
default: Option<&str>,
validator: Option<fn(&str) -> Result<()>>,
) -> Result<String>
pub fn text_input( prompt: &str, default: Option<&str>, validator: Option<fn(&str) -> Result<()>>, ) -> Result<String>
Get text input with validation
Sourcepub fn fuzzy_find<T: AsRef<str>>(
items: &[T],
query: &str,
limit: Option<usize>,
) -> Vec<(usize, i64)>
pub fn fuzzy_find<T: AsRef<str>>( items: &[T], query: &str, limit: Option<usize>, ) -> Vec<(usize, i64)>
Find and rank items using fuzzy matching
Auto Trait Implementations§
impl Freeze for Interactive
impl RefUnwindSafe for Interactive
impl Send for Interactive
impl Sync for Interactive
impl Unpin for Interactive
impl UnwindSafe for Interactive
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