pub struct CryptDevice { /* private fields */ }
Expand description

Data type that is a handle for a crypt device

Implementations§

source§

impl CryptDevice

source

pub fn from_ptr(ptr: *mut crypt_device) -> Self

Reconstruct a CryptDevice object from a pointer

source

pub fn settings_handle(&mut self) -> CryptSettingsHandle<'_>

Get a settings option handle

source

pub fn format_handle(&mut self) -> CryptFormatHandle<'_>

Get a format option handle

source

pub fn context_handle(&mut self) -> CryptContextHandle<'_>

Get a context option handle

source

pub fn keyslot_handle(&mut self) -> CryptKeyslotHandle<'_>

Get a keyslot option handle

source

pub fn runtime_handle<'a>(&'a mut self, name: &'a str) -> CryptRuntimeHandle<'a>

Get a runtime attribute option handle

source

pub fn luks2_flag_handle<T>(&mut self) -> CryptLuks2FlagsHandle<'_, T>

Get LUKS2 flags option handle

source

pub fn activate_handle(&mut self) -> CryptActivationHandle<'_>

Get activation option handle

source

pub fn volume_key_handle(&mut self) -> CryptVolumeKeyHandle<'_>

Get volume key option handle

source

pub fn status_handle(&mut self) -> CryptDeviceStatusHandle<'_>

Get crypt device status option handle

source

pub fn backup_handle(&mut self) -> CryptBackupHandle<'_>

Get crypt device backup option handle

source

pub fn keyfile_handle(&mut self) -> CryptKeyfileHandle<'_>

Get crypt device keyfile option handle

source

pub fn wipe_handle(&mut self) -> CryptWipeHandle<'_>

Get crypt device wipe option handle

source

pub fn token_handle(&mut self) -> CryptLuks2TokenHandle<'_>

Get crypt device LUKS2 token option handle

source

pub fn reencrypt_handle(&mut self) -> CryptLuks2ReencryptHandle<'_>

Get crypt device reencryption option handle

source

pub fn set_confirm_callback<T>( &mut self, confirm: Option<unsafe extern "C" fn(msg: *const c_char, usrptr: *mut c_void) -> c_int>, usrdata: Option<&mut T> )

Set the callback that prompts the user to confirm an action

source

pub fn set_data_device(&mut self, device_path: &Path) -> Result<(), LibcryptErr>

Set the device path for a data device

source

pub fn set_data_offset(&mut self, offset: u64) -> Result<(), LibcryptErr>

Set the offset in 4096-byte sectors for the data section on a device

Trait Implementations§

source§

impl Drop for CryptDevice

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.