Struct pam_client::conv_cli::Conversation [−][src]
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
impl Conversation[src]
#[must_use]pub fn new() -> Self[src]
Creates a new CLI conversation handler.
#[must_use]pub fn info_prefix(&self) -> &str[src]
The prefix text written before info text
pub fn set_info_prefix(&mut self, prefix: impl Into<String>)[src]
Updates the prefix put before info text
#[must_use]pub fn error_prefix(&self) -> &str[src]
The prefix text written before error messages
pub fn set_error_prefix(&mut self, prefix: impl Into<String>)[src]
Updates the prefix put before error messages
Trait Implementations
impl Clone for Conversation[src]
fn clone(&self) -> Conversation[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl ConversationHandler for Conversation[src]
fn prompt_echo_on(&mut self, msg: &CStr) -> Result<CString, ReturnCode>[src]
fn prompt_echo_off(&mut self, msg: &CStr) -> Result<CString, ReturnCode>[src]
fn text_info(&mut self, msg: &CStr)[src]
fn error_msg(&mut self, msg: &CStr)[src]
fn init(&mut self, _default_user: Option<impl AsRef<str>>)[src]
impl Debug for Conversation[src]
impl Default for Conversation[src]
Auto Trait Implementations
impl RefUnwindSafe for Conversation[src]
impl Send for Conversation[src]
impl Sync for Conversation[src]
impl Unpin for Conversation[src]
impl UnwindSafe for Conversation[src]
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> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
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>,