Struct credent_cli::CredentialsCliReader [−][src]
Reads Credentials
from the command line.
Fields
username_prompt: UsernamePrompt
Prompt text for the username.
password_prompt: PasswordPrompt
Prompt text for the password.
Implementations
impl CredentialsCliReader<(), ()>
[src]
pub async fn read_from_tty() -> Result<Credentials, Error>
[src]
Reads the username and password from the terminal.
pub async fn read_username() -> Result<Username, Error>
[src]
Reads the username from the terminal.
pub async fn read_password() -> Result<Password, Error>
[src]
Reads the password from the terminal.
impl<UsernamePrompt, PasswordPrompt> CredentialsCliReader<UsernamePrompt, PasswordPrompt> where
UsernamePrompt: Display,
PasswordPrompt: Display,
[src]
UsernamePrompt: Display,
PasswordPrompt: Display,
pub async fn prompt_from_tty(&self) -> Result<Credentials, Error>
[src]
Reads the username and password from the terminal.
pub async fn prompt_username(&self) -> Result<Username, Error>
[src]
Reads the username from the terminal.
pub async fn prompt_password(&self) -> Result<Password, Error>
[src]
Reads the password from the terminal.
pub async fn prompt_plain_text(prompt: &str) -> Result<String, Error>
[src]
Reads a plain text value from the terminal.
pub async fn prompt_secret(prompt: &str) -> Result<String, Error>
[src]
Reads a secret value from the terminal.
Trait Implementations
impl<UsernamePrompt: Debug, PasswordPrompt: Debug> Debug for CredentialsCliReader<UsernamePrompt, PasswordPrompt>
[src]
Auto Trait Implementations
impl<UsernamePrompt, PasswordPrompt> RefUnwindSafe for CredentialsCliReader<UsernamePrompt, PasswordPrompt> where
PasswordPrompt: RefUnwindSafe,
UsernamePrompt: RefUnwindSafe,
PasswordPrompt: RefUnwindSafe,
UsernamePrompt: RefUnwindSafe,
impl<UsernamePrompt, PasswordPrompt> Send for CredentialsCliReader<UsernamePrompt, PasswordPrompt> where
PasswordPrompt: Send,
UsernamePrompt: Send,
PasswordPrompt: Send,
UsernamePrompt: Send,
impl<UsernamePrompt, PasswordPrompt> Sync for CredentialsCliReader<UsernamePrompt, PasswordPrompt> where
PasswordPrompt: Sync,
UsernamePrompt: Sync,
PasswordPrompt: Sync,
UsernamePrompt: Sync,
impl<UsernamePrompt, PasswordPrompt> Unpin for CredentialsCliReader<UsernamePrompt, PasswordPrompt> where
PasswordPrompt: Unpin,
UsernamePrompt: Unpin,
PasswordPrompt: Unpin,
UsernamePrompt: Unpin,
impl<UsernamePrompt, PasswordPrompt> UnwindSafe for CredentialsCliReader<UsernamePrompt, PasswordPrompt> where
PasswordPrompt: UnwindSafe,
UsernamePrompt: UnwindSafe,
PasswordPrompt: UnwindSafe,
UsernamePrompt: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,