pub struct TerminalPromptHandler { /* private fields */ }Expand description
Terminal-based prompt handler
Displays permission prompts in the terminal and reads user input.
Implementations§
Trait Implementations§
Source§impl Debug for TerminalPromptHandler
impl Debug for TerminalPromptHandler
Source§impl Default for TerminalPromptHandler
impl Default for TerminalPromptHandler
Source§impl PromptHandler for TerminalPromptHandler
impl PromptHandler for TerminalPromptHandler
Source§fn prompt(
&self,
plugin: &str,
capabilities: &Capabilities,
) -> Result<PromptResult, PromptError>
fn prompt( &self, plugin: &str, capabilities: &Capabilities, ) -> Result<PromptResult, PromptError>
Display a permission prompt and get user’s decision
Source§fn is_interactive(&self) -> bool
fn is_interactive(&self) -> bool
Check if this handler supports interactive prompts
Source§fn prompt_escalation(
&self,
plugin: &str,
old_caps: &Capabilities,
new_caps: &Capabilities,
) -> Result<PromptResult, PromptError>
fn prompt_escalation( &self, plugin: &str, old_caps: &Capabilities, new_caps: &Capabilities, ) -> Result<PromptResult, PromptError>
Display an escalation warning and get user’s decision
Auto Trait Implementations§
impl Freeze for TerminalPromptHandler
impl RefUnwindSafe for TerminalPromptHandler
impl Send for TerminalPromptHandler
impl Sync for TerminalPromptHandler
impl Unpin for TerminalPromptHandler
impl UnwindSafe for TerminalPromptHandler
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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