Struct libcryptsetup_rs::CryptDevice
source · pub struct CryptDevice { /* private fields */ }
Expand description
Data type that is a handle for a crypt device
Implementations§
source§impl CryptDevice
impl CryptDevice
sourcepub fn from_ptr(ptr: *mut crypt_device) -> Self
pub fn from_ptr(ptr: *mut crypt_device) -> Self
Reconstruct a CryptDevice
object from a pointer
sourcepub fn settings_handle(&mut self) -> CryptSettingsHandle<'_>
pub fn settings_handle(&mut self) -> CryptSettingsHandle<'_>
Get a settings option handle
sourcepub fn format_handle(&mut self) -> CryptFormatHandle<'_>
pub fn format_handle(&mut self) -> CryptFormatHandle<'_>
Get a format option handle
sourcepub fn context_handle(&mut self) -> CryptContextHandle<'_>
pub fn context_handle(&mut self) -> CryptContextHandle<'_>
Get a context option handle
sourcepub fn keyslot_handle(&mut self) -> CryptKeyslotHandle<'_>
pub fn keyslot_handle(&mut self) -> CryptKeyslotHandle<'_>
Get a keyslot option handle
sourcepub fn runtime_handle<'a>(&'a mut self, name: &'a str) -> CryptRuntimeHandle<'a>
pub fn runtime_handle<'a>(&'a mut self, name: &'a str) -> CryptRuntimeHandle<'a>
Get a runtime attribute option handle
sourcepub fn luks2_flag_handle<T>(&mut self) -> CryptLuks2FlagsHandle<'_, T>
pub fn luks2_flag_handle<T>(&mut self) -> CryptLuks2FlagsHandle<'_, T>
Get LUKS2 flags option handle
sourcepub fn activate_handle(&mut self) -> CryptActivationHandle<'_>
pub fn activate_handle(&mut self) -> CryptActivationHandle<'_>
Get activation option handle
sourcepub fn volume_key_handle(&mut self) -> CryptVolumeKeyHandle<'_>
pub fn volume_key_handle(&mut self) -> CryptVolumeKeyHandle<'_>
Get volume key option handle
sourcepub fn status_handle(&mut self) -> CryptDeviceStatusHandle<'_>
pub fn status_handle(&mut self) -> CryptDeviceStatusHandle<'_>
Get crypt device status option handle
sourcepub fn backup_handle(&mut self) -> CryptBackupHandle<'_>
pub fn backup_handle(&mut self) -> CryptBackupHandle<'_>
Get crypt device backup option handle
sourcepub fn keyfile_handle(&mut self) -> CryptKeyfileHandle<'_>
pub fn keyfile_handle(&mut self) -> CryptKeyfileHandle<'_>
Get crypt device keyfile option handle
sourcepub fn wipe_handle(&mut self) -> CryptWipeHandle<'_>
pub fn wipe_handle(&mut self) -> CryptWipeHandle<'_>
Get crypt device wipe option handle
sourcepub fn token_handle(&mut self) -> CryptLuks2TokenHandle<'_>
pub fn token_handle(&mut self) -> CryptLuks2TokenHandle<'_>
Get crypt device LUKS2 token option handle
sourcepub fn reencrypt_handle(&mut self) -> CryptLuks2ReencryptHandle<'_>
pub fn reencrypt_handle(&mut self) -> CryptLuks2ReencryptHandle<'_>
Get crypt device reencryption option handle
sourcepub 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>
)
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
sourcepub fn set_data_device(&mut self, device_path: &Path) -> Result<(), LibcryptErr>
pub fn set_data_device(&mut self, device_path: &Path) -> Result<(), LibcryptErr>
Set the device path for a data device
sourcepub fn set_data_offset(&mut self, offset: u64) -> Result<(), LibcryptErr>
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§
Auto Trait Implementations§
impl RefUnwindSafe for CryptDevice
impl !Send for CryptDevice
impl !Sync for CryptDevice
impl Unpin for CryptDevice
impl UnwindSafe for CryptDevice
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more