Struct fm::cryptsetup::DeviceOpener
source · pub struct DeviceOpener {
pub content: Vec<Device>,
/* 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<Device>Implementations§
source§impl DeviceOpener
impl DeviceOpener
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) -> FmResult<()>
pub fn mount_selected(&mut self) -> FmResult<()>
Open and mount the selected device.
sourcepub fn umount_selected(&mut self) -> FmResult<()>
pub fn umount_selected(&mut self) -> FmResult<()>
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 DeviceOpener
impl Clone for DeviceOpener
source§fn clone(&self) -> DeviceOpener
fn clone(&self) -> DeviceOpener
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 DeviceOpener
impl Debug for DeviceOpener
source§impl Default for DeviceOpener
impl Default for DeviceOpener
source§fn default() -> DeviceOpener
fn default() -> DeviceOpener
Returns the “default value” for a type. Read more
source§impl SelectableContent<Device> for DeviceOpener
impl SelectableContent<Device> for DeviceOpener
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.