PasswordConv

Struct PasswordConv 

Source
pub struct PasswordConv { /* private fields */ }
Expand description

A minimalistic conversation handler, that uses given login and password

This conversation handler is not really interactive, but simply returns to PAM the value that have been set using the set_credentials method.

Implementations§

Source§

impl PasswordConv

Source

pub fn set_credentials<U: Into<String>, V: Into<String>>( &mut self, login: U, password: V, )

Set the credentials that this handler will provide to PAM

Trait Implementations§

Source§

impl Conversation for PasswordConv

Source§

fn prompt_echo(&mut self, _msg: &CStr) -> Result<CString, ()>

PAM requests a value that should be echoed to the user as they type it Read more
Source§

fn prompt_blind(&mut self, _msg: &CStr) -> Result<CString, ()>

PAM requests a value that should be typed blindly by the user Read more
Source§

fn info(&mut self, _msg: &CStr)

This is an informational message from PAM
Source§

fn error(&mut self, msg: &CStr)

This is an error message from PAM

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.