Enum nt_hive::NtHiveError[][src]

pub enum NtHiveError {
Show 15 variants InvalidChecksum { expected: u32, actual: u32, }, InvalidDataSize { offset: usize, expected: usize, actual: usize, }, InvalidFourByteSignature { offset: usize, expected: &'static [u8], actual: [u8; 4], }, InvalidHeaderSize { offset: usize, expected: usize, actual: usize, }, InvalidKeyValueDataType { expected: &'static [KeyValueDataType], actual: KeyValueDataType, }, InvalidSizeField { offset: usize, expected: usize, actual: usize, }, InvalidSizeFieldAlignment { offset: usize, size: usize, expected_alignment: usize, }, InvalidTwoByteSignature { offset: usize, expected: &'static [u8], actual: [u8; 2], }, SequenceNumberMismatch { primary: u32, secondary: u32, }, UnallocatedCell { offset: usize, size: i32, }, UnsupportedClusteringFactor { expected: u32, actual: u32, }, UnsupportedFileFormat { expected: u32, actual: u32, }, UnsupportedFileType { expected: u32, actual: u32, }, UnsupportedKeyValueDataType { offset: usize, actual: u32, }, UnsupportedVersion { major: u32, minor: u32, },
}
Expand description

Central error type of nt-hive.

Variants

InvalidChecksum

The checksum in the base block should be {expected}, but it is {actual}

Fields of InvalidChecksum

expected: u32actual: u32
InvalidDataSize

The data at offset {offset:#010x} should have a size of {expected} bytes, but it only has {actual} bytes

Fields of InvalidDataSize

offset: usizeexpected: usizeactual: usize
InvalidFourByteSignature

The 4-byte signature field at offset {offset:#010x} should contain {expected:?}, but it contains {actual:?}

Fields of InvalidFourByteSignature

offset: usizeexpected: &'static [u8]actual: [u8; 4]
InvalidHeaderSize

The struct at offset {offset:#010x} should have a size of {expected} bytes, but only {actual} bytes are left in the slice

Fields of InvalidHeaderSize

offset: usizeexpected: usizeactual: usize
InvalidKeyValueDataType

Expected one of the key value data types {expected:?}, but found {actual:?}

Fields of InvalidKeyValueDataType

expected: &'static [KeyValueDataType]actual: KeyValueDataType
InvalidSizeField

The size field at offset {offset:#010x} specifies {expected} bytes, but only {actual} bytes are left in the slice

Fields of InvalidSizeField

offset: usizeexpected: usizeactual: usize
InvalidSizeFieldAlignment

The size field at offset {offset:#010x} specifies {size} bytes, but they are not aligned to the expected {expected_alignment} bytes

Fields of InvalidSizeFieldAlignment

offset: usizesize: usizeexpected_alignment: usize
InvalidTwoByteSignature

The 2-byte signature field at offset {offset:#010x} should contain {expected:?}, but it contains {actual:?}

Fields of InvalidTwoByteSignature

offset: usizeexpected: &'static [u8]actual: [u8; 2]
SequenceNumberMismatch

The sequence numbers in the base block do not match ({primary} != {secondary})

Fields of SequenceNumberMismatch

primary: u32secondary: u32
UnallocatedCell

The cell at offset {offset:#010x} with a size of {size} bytes is unallocated

Fields of UnallocatedCell

offset: usizesize: i32
UnsupportedClusteringFactor

The clustering factor in the base block is expected to be {expected}, but it is {actual}

Fields of UnsupportedClusteringFactor

expected: u32actual: u32
UnsupportedFileFormat

The file format in the base block is expected to be {expected}, but it is {actual}

Fields of UnsupportedFileFormat

expected: u32actual: u32
UnsupportedFileType

The file type in the base block is expected to be {expected}, but it is {actual}

Fields of UnsupportedFileType

expected: u32actual: u32
UnsupportedKeyValueDataType

The key value data type at offset {offset:#010x} is {actual:#010x}, which is not supported

Fields of UnsupportedKeyValueDataType

offset: usizeactual: u32
UnsupportedVersion

The version in the base block ({major}.{minor}) is unsupported

Fields of UnsupportedVersion

major: u32minor: u32

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

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

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

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

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.

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

Converts the given value to a String. 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.