pub struct EncryptedOffset {
pub sector: u64,
pub total_sectors: u64,
}Expand description
Progressive-encryption progress state.
All sector numbers are relative to the data region (offset_sector):
0 is the first encryptable sector and header/footer metadata regions are
not counted. The filter maps an absolute LBA to rel = lba - offset_sector
before comparing against these values.
Fields§
§sector: u64Sectors before this (data-region relative) are already encrypted.
total_sectors: u64Total number of sectors to encrypt (metadata regions excluded).
Implementations§
Source§impl EncryptedOffset
impl EncryptedOffset
Sourcepub fn is_encrypted(&self, sector: u64) -> bool
pub fn is_encrypted(&self, sector: u64) -> bool
sector is a data-region relative sector number.
pub fn is_fully_encrypted(&self) -> bool
Trait Implementations§
Source§impl Clone for EncryptedOffset
impl Clone for EncryptedOffset
Source§fn clone(&self) -> EncryptedOffset
fn clone(&self) -> EncryptedOffset
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EncryptedOffset
impl Debug for EncryptedOffset
Source§impl<'de> Deserialize<'de> for EncryptedOffset
impl<'de> Deserialize<'de> for EncryptedOffset
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EncryptedOffset
impl RefUnwindSafe for EncryptedOffset
impl Send for EncryptedOffset
impl Sync for EncryptedOffset
impl Unpin for EncryptedOffset
impl UnsafeUnpin for EncryptedOffset
impl UnwindSafe for EncryptedOffset
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