pub struct Fdt { /* private fields */ }
Implementations§
Source§impl Fdt
impl Fdt
pub fn as_slice(&self) -> &[u8]
Sourcepub unsafe fn from_ptr(ptr: *mut u8) -> Result<Fdt, FdtError>
pub unsafe fn from_ptr(ptr: *mut u8) -> Result<Fdt, FdtError>
Create a new Fdt
from a raw pointer and size in bytes.
§Safety
The caller must ensure that the pointer is valid and points to a
memory region of at least size
bytes that contains a valid device tree
blob.
pub fn version(&self) -> u32
pub fn header(&self) -> Header
pub fn all_nodes(&self) -> Vec<Node>
Sourcepub fn find_nodes(&self, path: impl AsRef<str>) -> Vec<Node>
pub fn find_nodes(&self, path: impl AsRef<str>) -> Vec<Node>
if path start with ‘/’ then search by path, else search by aliases
pub fn find_aliase(&self, name: impl AsRef<str>) -> Option<String>
pub fn get_node_by_phandle(&self, phandle: Phandle) -> Option<Node>
pub fn find_compatible(&self, with: &[&str]) -> Vec<Node>
pub fn memory_reservation_blocks(&self) -> Vec<MemoryRegion>
pub fn raw<'a>(&'a self) -> Raw<'a>
Sourcepub fn get_node_by_path(&self, path: &str) -> Option<Node>
pub fn get_node_by_path(&self, path: &str) -> Option<Node>
Get a node by its path in the device tree
pub fn memory(&self) -> Result<Vec<Memory>, FdtError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Fdt
impl RefUnwindSafe for Fdt
impl Send for Fdt
impl Sync for Fdt
impl Unpin for Fdt
impl UnwindSafe for Fdt
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