pub struct PasswordCommand(/* private fields */);Expand description
A command that prints the password: the program and its arguments.
Implementations§
Source§impl PasswordCommand
impl PasswordCommand
Sourcepub fn run(&self, timeout: Duration) -> Result<SecretString, Error>
pub fn run(&self, timeout: Duration) -> Result<SecretString, Error>
Runs the command and returns what it prints, without one trailing
line break. Stops it after timeout. Its standard input is the
terminal, if there is one, and else empty, so that it cannot read
what is meant for fritz, like the messages of an MCP client.
Without a terminal, the command gets a process group of its own on
Unix, so that a timeout also stops the processes it started. With a
terminal it stays in the group of fritz: a process group in the
background may not read from the terminal, so a password manager
could not ask to be unlocked.
Trait Implementations§
Source§impl Clone for PasswordCommand
impl Clone for PasswordCommand
Source§impl Debug for PasswordCommand
impl Debug for PasswordCommand
Source§impl<'de> Deserialize<'de> for PasswordCommand
impl<'de> Deserialize<'de> for PasswordCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PasswordCommand
Source§impl From<PasswordCommand> for Vec<String>
impl From<PasswordCommand> for Vec<String>
Source§fn from(command: PasswordCommand) -> Self
fn from(command: PasswordCommand) -> Self
Converts to this type from the input type.
Source§impl FromStr for PasswordCommand
impl FromStr for PasswordCommand
Source§impl PartialEq for PasswordCommand
impl PartialEq for PasswordCommand
Source§impl Serialize for PasswordCommand
impl Serialize for PasswordCommand
impl StructuralPartialEq for PasswordCommand
Auto Trait Implementations§
impl Forget for PasswordCommand
impl Freeze for PasswordCommand
impl Move for PasswordCommand
impl RefUnwindSafe for PasswordCommand
impl Send for PasswordCommand
impl Sync for PasswordCommand
impl Unpin for PasswordCommand
impl UnsafeUnpin for PasswordCommand
impl UnwindSafe for PasswordCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more