Enum dtb::Error

source ·
pub enum Error {
Show 23 variants BadMagic, BadNodeName, BadPropertyName, BadStrEncoding(Utf8Error), BadStructItemType, BadStructToken, BadTotalSize, BadU32List, BadValueStr, BadVersion, BufferTooSmall, NoMoreStructItems, NoZeroReservedMemEntry, OutOfParentNode, OverlappingReservedMem, OverlappingStrings, OverlappingStruct, UnalignedBlob, UnalignedReservedMem, UnalignedStruct, UnexpectedEndOfBlob, UnexpectedEndOfStruct, UnsupportedCompVersion,
}
Expand description

DTB-related error.

Variants

BadMagic

Incorrect DTB magic number.

BadNodeName

Node name is not a zero-terminated string.

BadPropertyName

Property name is not a zero-terminated string.

BadStrEncoding(Utf8Error)

Failed to decode UTF-8 string.

BadStructItemType

Operation doesn’t support a given type of StructItem.

BadStructToken

Unrecognized DTB structure token.

BadTotalSize

Total size in DTB header is incorrect.

BadU32List

Property value cannot be decoded as list of integers.

BadValueStr

Property value cannot be decoded as string.

BadVersion

DTB format version is less than last compatible version.

BufferTooSmall

Given buffer is too small to decode property value.

NoMoreStructItems

No more StructItem left in DTB structure.

NoZeroReservedMemEntry

No zero entry found in reserved memory block.

OutOfParentNode

Stopped matching a given path, since the parent node has ended.

OverlappingReservedMem

Reserved memory block overlaps a structure block.

OverlappingStrings

Structure block overlaps an end of blob.

OverlappingStruct

Structure block overlaps a strings block.

UnalignedBlob

Given blob is not 8-byte aligned.

UnalignedReservedMem

Reserved memory block is not 8-byte aligned.

UnalignedStruct

Structure block is not 4-byte aligned.

UnexpectedEndOfBlob

Given blob is smaller than DTB-header.

UnexpectedEndOfStruct

Structure block doesn’t end with DTB_END token.

UnsupportedCompVersion

Unsupported last compatible version.

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
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.