[−][src]Trait fdt_rs::prelude::PropReader
Associated Types
type NodeType
Required methods
Loading content...Provided methods
fn name(&self) -> Result<&'dt str>
Returns the name of the property within the device tree.
#[must_use]fn length(&self) -> usize
Returns the length of the property value within the device tree
fn u32(&self, index: usize) -> Result<u32>
Read a big-endian u32
from the provided offset in this device tree property's value.
Convert the read value into the machines' native u32
format and return it.
If an offset which would cause this read to access memory outside of this property's value
an Err
containing DevTreeError::InvalidOffset
will be returned.
fn u64(&self, index: usize) -> Result<u64>
Read a big-endian u64
from the provided offset in this device tree property's value.
Convert the read value into the machines' native u64
format and return it.
If an offset which would cause this read to access memory outside of this property's value
an Err
containing DevTreeError::InvalidOffset
will be returned.
fn phandle(&self, index: usize) -> Result<Phandle>
A Phandle is simply defined as a u32 value, as such this method performs the same action as
[self.u32
]
fn str(&self) -> Result<&'dt str>
Returns the string property as a string if it can be parsed as one.
Safety
See the safety note of PropReader::u32