Struct CryptDevice

Source
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 512-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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

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>,

Source§

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.