pub struct MockSelectionProvider {
pub response: String,
}Expand description
Mock implementation for testing that returns a predetermined value
Fields§
§response: StringImplementations§
Trait Implementations§
Source§impl SelectionProvider for MockSelectionProvider
impl SelectionProvider for MockSelectionProvider
Source§fn select(&self, _prompt: &str, options: Vec<String>) -> Result<String>
fn select(&self, _prompt: &str, options: Vec<String>) -> Result<String>
Present a selection menu and return the user’s choice Read more
Source§fn select_grouped(
&self,
_prompt: &str,
options: Vec<GitRefOption>,
) -> Result<String>
fn select_grouped( &self, _prompt: &str, options: Vec<GitRefOption>, ) -> Result<String>
Present a grouped selection menu with visual separators Read more
Source§fn get_text_input(
&self,
_prompt: &str,
_validator: Option<ValidatorFn>,
) -> Result<String>
fn get_text_input( &self, _prompt: &str, _validator: Option<ValidatorFn>, ) -> Result<String>
Get text input from the user with validation Read more
Auto Trait Implementations§
impl Freeze for MockSelectionProvider
impl RefUnwindSafe for MockSelectionProvider
impl Send for MockSelectionProvider
impl Sync for MockSelectionProvider
impl Unpin for MockSelectionProvider
impl UnsafeUnpin for MockSelectionProvider
impl UnwindSafe for MockSelectionProvider
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