pub enum FdtError {
NotFound,
BufferTooSmall {
pos: usize,
},
InvalidMagic(u32),
InvalidPtr,
InvalidInput,
FromBytesUntilNull,
Utf8Error(Utf8Error),
NoAlias(&'static str),
NoMemory,
NodeNotFound(&'static str),
PropertyNotFound(&'static str),
}Expand description
Errors that can occur during FDT parsing.
This enum represents all possible error conditions that may be encountered when parsing a device tree blob or accessing its contents.
Variants§
NotFound
A requested item (node, property, etc.) was not found
BufferTooSmall
The buffer is too small to read the requested data at the given position
InvalidMagic(u32)
The FDT magic number doesn’t match the expected value
InvalidPtr
An invalid pointer was provided
InvalidInput
The input data is invalid or malformed
FromBytesUntilNull
A null-terminated string was expected but not found
Utf8Error(Utf8Error)
Failed to parse data as a UTF-8 string
NoAlias(&'static str)
The specified alias was not found in the /aliases node
NoMemory
Memory allocation failed
NodeNotFound(&'static str)
The specified node was not found
PropertyNotFound(&'static str)
The specified property was not found
Trait Implementations§
Source§impl Error for FdtError
impl Error for FdtError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<FromBytesUntilNulError> for FdtError
impl From<FromBytesUntilNulError> for FdtError
Source§fn from(_: FromBytesUntilNulError) -> Self
fn from(_: FromBytesUntilNulError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FdtError
impl RefUnwindSafe for FdtError
impl Send for FdtError
impl Sync for FdtError
impl Unpin for FdtError
impl UnwindSafe for FdtError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more