pub struct PasswordPrompt { /* private fields */ }Expand description
Password prompt component for sudo authentication
Implementations§
Source§impl PasswordPrompt
impl PasswordPrompt
Sourcepub fn is_visible(&self) -> bool
pub fn is_visible(&self) -> bool
Check if the prompt is visible
Sourcepub fn is_authenticated(&self) -> bool
pub fn is_authenticated(&self) -> bool
Check if authentication was successful
Sourcepub fn remove_char(&mut self)
pub fn remove_char(&mut self)
Remove the last character from the password input
Sourcepub fn verify_password(&mut self) -> Result<bool>
pub fn verify_password(&mut self) -> Result<bool>
Verify the password using sudo
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PasswordPrompt
impl RefUnwindSafe for PasswordPrompt
impl Send for PasswordPrompt
impl Sync for PasswordPrompt
impl Unpin for PasswordPrompt
impl UnwindSafe for PasswordPrompt
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