pub struct SecretPromptQueue { /* private fields */ }Implementations§
Source§impl SecretPromptQueue
impl SecretPromptQueue
pub fn new() -> SecretPromptQueue
pub fn poll_requests( &mut self, rx: &Arc<Mutex<UnboundedReceiver<SecretPromptRequest>>>, )
pub fn is_active(&self) -> bool
pub fn active(&self) -> Option<&PendingSecretPrompt>
pub fn push_char(&mut self, ch: char)
pub fn backspace(&mut self)
Sourcepub fn move_confirm_focus(&mut self, forward: bool)
pub fn move_confirm_focus(&mut self, forward: bool)
Confirm dialog: move focus to the next / previous button. Focus
does NOT wrap (from the default Deny, “forward” stays put). Moving
cancels a pending “Allow all” confirmation. No-op for Secret.
Sourcepub fn restart_input_guard(&mut self)
pub fn restart_input_guard(&mut self)
Restart the input guard: the dialog ignores keys for another
[CONFIRM_ARM_DELAY] (called for every key ignored while unarmed, so
typing that runs past the window keeps the dialog dead until a pause).
Sourcepub fn allow_all_pending(&self) -> bool
pub fn allow_all_pending(&self) -> bool
Confirm dialog: whether “Allow all” is waiting for its second Enter.
Sourcepub fn cancel_allow_all_pending(&mut self) -> bool
pub fn cancel_allow_all_pending(&mut self) -> bool
Esc while “Allow all” awaits confirmation: cancel just that step. Returns whether there was one to cancel.
Sourcepub fn drop_allow_all(&mut self)
pub fn drop_allow_all(&mut self)
Input ownership moved away: remove the “Allow all” button from the prompt on screen AND from every prompt already queued behind it (only the owner may arm it).
Sourcepub fn confirm_focus(&self) -> ConfirmChoice
pub fn confirm_focus(&self) -> ConfirmChoice
Confirm dialog: the focused button (Deny when no confirm is active).
Sourcepub fn input_armed(&self) -> bool
pub fn input_armed(&self) -> bool
Whether the active prompt accepts keys yet (see [CONFIRM_ARM_DELAY]).
Sourcepub fn confirm_offers_allow_all(&self) -> bool
pub fn confirm_offers_allow_all(&self) -> bool
Confirm dialog: whether the “Allow all (session)” button is offered.
Sourcepub fn confirm_answer(&mut self, choice: ConfirmChoice) -> Option<ConfirmChoice>
pub fn confirm_answer(&mut self, choice: ConfirmChoice) -> Option<ConfirmChoice>
Confirm dialog: answer with choice. AllowAll on a prompt that
does not offer it does nothing (never a silent single Allow).
Returns the choice actually sent, or None when nothing was sent.
Sourcepub fn confirm_activate_focused(&mut self) -> Option<ConfirmChoice>
pub fn confirm_activate_focused(&mut self) -> Option<ConfirmChoice>
Confirm dialog: activate the focused button (Enter). Deny is the
default focus, so an un-navigated Enter denies (fail-closed).
“Allow all” takes two Enters: the first only asks for confirmation
and restarts the input guard; the second (once armed) answers.
pub fn submit(&mut self)
pub fn cancel(&mut self)
Trait Implementations§
Source§impl Default for SecretPromptQueue
impl Default for SecretPromptQueue
Source§fn default() -> SecretPromptQueue
fn default() -> SecretPromptQueue
Auto Trait Implementations§
impl !RefUnwindSafe for SecretPromptQueue
impl !UnwindSafe for SecretPromptQueue
impl Freeze for SecretPromptQueue
impl Send for SecretPromptQueue
impl Sync for SecretPromptQueue
impl Unpin for SecretPromptQueue
impl UnsafeUnpin for SecretPromptQueue
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> ⓘ
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> ⓘ
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