Enum luks2::LuksSegment [−][src]
pub enum LuksSegment {
crypt {
offset: u64,
size: LuksSegmentSize,
iv_tweak: u64,
encryption: String,
sector_size: u16,
integrity: Option<LuksIntegrity>,
flags: Option<Vec<String>>,
},
}
Expand description
A segment contains a definition of encrypted areas on the disk containing user data (in LUKS1 mentioned as the user data payload). For a normal LUKS device, there ist only one data segment present.
Only the crypt
type is currently used.
Variants
Fields of crypt
offset: u64
The offset from the device start to the beginning of the segment in bytes.
size: LuksSegmentSize
The segment size, see LuksSegmentSize
.
iv_tweak: u64
The starting offset for the Initialization Vector.
encryption: String
The segment encryption algorithm in dm-crypt notaton (e. g. “aes-xts-plain64”).
sector_size: u16
The sector size for the segment (512, 1024, 2048, or 4096 bytes).
integrity: Option<LuksIntegrity>
The LUKS2 user data integrity protection type (optional, only included for parsing compatibility).
flags: Option<Vec<String>>
An array of strings marking the segment with additional information (optional).
Implementations
Returns the size of the segment.
Returns the segment encryption algorithm.
Returns the sector size of the segment.
Returns the integrity object of the segment.
Trait Implementations
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for LuksSegment
impl Send for LuksSegment
impl Sync for LuksSegment
impl Unpin for LuksSegment
impl UnwindSafe for LuksSegment
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self