Struct fm::cryptsetup::CryptoDeviceOpener
source · pub struct CryptoDeviceOpener {
pub content: Vec<CryptoDeviceMounter>,
/* private fields */
}Expand description
Holds a list of devices and an index. It’s a navigable content so the index follows the selection of the user.
Fields§
§content: Vec<CryptoDeviceMounter>Implementations§
source§impl CryptoDeviceOpener
impl CryptoDeviceOpener
sourcepub fn set_password(&mut self, password_kind: PasswordKind, password: String)
pub fn set_password(&mut self, password_kind: PasswordKind, password: String)
Set a password for the selected device.
sourcepub fn mount_selected(&mut self) -> Result<()>
pub fn mount_selected(&mut self) -> Result<()>
Open and mount the selected device.
sourcepub fn umount_selected(&mut self) -> Result<()>
pub fn umount_selected(&mut self) -> Result<()>
Unmount and close the selected device.
sourcepub fn has_cryptsetup(&self) -> bool
pub fn has_cryptsetup(&self) -> bool
True if the selected device has cryptsetup passphrase.
Trait Implementations§
source§impl Clone for CryptoDeviceOpener
impl Clone for CryptoDeviceOpener
source§fn clone(&self) -> CryptoDeviceOpener
fn clone(&self) -> CryptoDeviceOpener
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for CryptoDeviceOpener
impl Debug for CryptoDeviceOpener
source§impl Default for CryptoDeviceOpener
impl Default for CryptoDeviceOpener
source§fn default() -> CryptoDeviceOpener
fn default() -> CryptoDeviceOpener
Returns the “default value” for a type. Read more
source§impl SelectableContent<CryptoDeviceMounter> for CryptoDeviceOpener
impl SelectableContent<CryptoDeviceMounter> for CryptoDeviceOpener
Implement a selectable content for this struct.
This trait allows to navigate through a vector of element content_type.
It implements: is_empty, len, next, prev, selected.
selected returns an optional reference to the value.
source§fn selected(&self) -> Option<&CryptoDeviceMounter>
fn selected(&self) -> Option<&CryptoDeviceMounter>
Returns a reference to the selected content.
source§fn content(&self) -> &Vec<CryptoDeviceMounter>
fn content(&self) -> &Vec<CryptoDeviceMounter>
A reference to the content.