Enum nt_hive::NtHiveError[][src]

pub enum NtHiveError {
    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,
    },
}

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

impl Clone for NtHiveError[src]

impl Debug for NtHiveError[src]

impl Display for NtHiveError[src]

impl Error for NtHiveError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.