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.
Auto Trait Implementations§
impl RefUnwindSafe for DeviceOpener
impl Send for DeviceOpener
impl Sync for DeviceOpener
impl Unpin for DeviceOpener
impl UnwindSafe for DeviceOpener
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().