Struct pam_client::conv_cli::Conversation
source · [−]pub struct Conversation { /* private fields */ }
Expand description
Command-line implementation of ConversationHandler
This struct is unavailable if pam-client is built without the "cli"
feature.
Prompts, info and error messages will be written to STDERR, non-secret input in read from STDIN and rpassword is used to prompt the user for passwords.
Limitations
Please note that UTF-8 encoding is assumed for terminal I/O, so this handler may fail to authenticate on legacy non-UTF-8 systems when the user input contains non-ASCII characters.
Implementations
sourceimpl Conversation
impl Conversation
sourcepub fn info_prefix(&self) -> &str
pub fn info_prefix(&self) -> &str
The prefix text written before info text
sourcepub fn set_info_prefix(&mut self, prefix: impl Into<String>)
pub fn set_info_prefix(&mut self, prefix: impl Into<String>)
Updates the prefix put before info text
sourcepub fn error_prefix(&self) -> &str
pub fn error_prefix(&self) -> &str
The prefix text written before error messages
sourcepub fn set_error_prefix(&mut self, prefix: impl Into<String>)
pub fn set_error_prefix(&mut self, prefix: impl Into<String>)
Updates the prefix put before error messages
Trait Implementations
sourceimpl Clone for Conversation
impl Clone for Conversation
sourcefn clone(&self) -> Conversation
fn clone(&self) -> Conversation
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl ConversationHandler for Conversation
impl ConversationHandler for Conversation
sourcefn prompt_echo_on(&mut self, msg: &CStr) -> Result<CString, ErrorCode>
fn prompt_echo_on(&mut self, msg: &CStr) -> Result<CString, ErrorCode>
Obtains a string whilst echoing text (e.g. username) Read more
sourcefn prompt_echo_off(&mut self, msg: &CStr) -> Result<CString, ErrorCode>
fn prompt_echo_off(&mut self, msg: &CStr) -> Result<CString, ErrorCode>
Obtains a string without echoing any text (e.g. password) Read more
sourceimpl Debug for Conversation
impl Debug for Conversation
Auto Trait Implementations
impl RefUnwindSafe for Conversation
impl Send for Conversation
impl Sync for Conversation
impl Unpin for Conversation
impl UnwindSafe for Conversation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more