fdt_parser/error.rs
1pub type FdtResult<'a, T = ()> = Result<T, FdtError<'a>>;
2
3#[derive(Debug)]
4pub enum FdtError<'a> {
5 NotFound(&'static str),
6 /// The FDT had an invalid magic value.
7 BadMagic,
8 /// The given pointer was null.
9 BadPtr,
10 /// Invalid cell encoding.
11 BadCell,
12 /// Unsupported cell size.
13 BadCellSize(usize),
14
15 /// The slice passed in was too small to fit the given total size of the FDT
16 /// structure.
17 Eof,
18
19 MissingProperty,
20
21 Utf8Parse {
22 data: &'a [u8],
23 },
24
25 FromBytesUntilNull {
26 data: &'a [u8],
27 },
28}