[−][src]Struct pinentry::MessageDialog
A dialog for showing a message to the user.
Implementations
impl<'a> MessageDialog<'a>
[src]
pub fn with_default_binary() -> Option<Self>
[src]
Creates a new MessageDialog using the binary named pinentry
.
Returns None
if pinentry
cannot be found in PATH
.
pub fn with_binary<T: AsRef<OsStr>>(binary_name: T) -> Option<Self>
[src]
Creates a new MessageDialog using the given path to, or name of, a pinentry
binary.
Returns None
if:
- A path was provided that does not exist.
- A binary name was provided that cannot be found in
PATH
. - The binary is found but is not executable.
pub fn with_title(&mut self, title: &'a str) -> &mut Self
[src]
Sets the window title.
When using this feature you should take care that the window is still identifiable as the pinentry.
pub fn with_ok(&mut self, ok: &'a str) -> &mut Self
[src]
Sets the text for the button signalling confirmation (the "OK" button).
You should use an underscore in the text only if you know that a modern version of pinentry is used. Modern versions underline the next character after the underscore and use the first such underlined character as a keyboard accelerator. Use a double underscore to escape an underscore.
pub fn with_timeout(&mut self, timeout: u16) -> &mut Self
[src]
Sets the timeout (in seconds) before returning an error.
pub fn show_message(&self, message: &str) -> Result<()>
[src]
Shows a message.
Auto Trait Implementations
impl<'a> RefUnwindSafe for MessageDialog<'a>
impl<'a> Send for MessageDialog<'a>
impl<'a> Sync for MessageDialog<'a>
impl<'a> Unpin for MessageDialog<'a>
impl<'a> UnwindSafe for MessageDialog<'a>
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,
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.
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>,