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

crypt

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 offset of the segment.

Returns the size of the segment.

Returns the starting offset for the Initialization Vector.

Returns the segment encryption algorithm.

Returns the sector size of the segment.

Returns the integrity object of the segment.

Returns the flags of the segment.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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 !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.