fdt_parser/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
pub type FdtResult<'a, T = ()> = Result<T, FdtError<'a>>;

#[derive(Debug)]
pub enum FdtError<'a> {
    NotFound(&'static str),
    /// The FDT had an invalid magic value.
    BadMagic,
    /// The given pointer was null.
    BadPtr,
    /// Invalid cell encoding.
    BadCell,
    /// Unsupported cell size.
    BadCellSize(usize),

    /// The slice passed in was too small to fit the given total size of the FDT
    /// structure.
    Eof,

    MissingProperty,

    Utf8Parse {
        data: &'a [u8],
    },

    FromBytesUntilNull {
        data: &'a [u8],
    },
}