pub struct DevTreeNode<'a, 'dt: 'a> { /* private fields */ }
Expand description
A handle to a Device Tree Node within the device tree.
Implementations§
Source§impl<'a, 'dt: 'a> DevTreeNode<'a, 'dt>
impl<'a, 'dt: 'a> DevTreeNode<'a, 'dt>
Sourcepub fn name(&'a self) -> Result<&'dt str>
pub fn name(&'a self) -> Result<&'dt str>
Returns the name of the DevTreeNode
(including unit address tag)
Sourcepub fn props(&self) -> DevTreeNodePropIter<'a, 'dt>
pub fn props(&self) -> DevTreeNodePropIter<'a, 'dt>
Returns an iterator over this node’s children DevTreeProp
Sourcepub fn find_next_compatible_node(
&self,
string: &str,
) -> Result<Option<DevTreeNode<'a, 'dt>>>
pub fn find_next_compatible_node( &self, string: &str, ) -> Result<Option<DevTreeNode<'a, 'dt>>>
Returns the next DevTreeNode
object with the provided compatible device tree property
or None
if none exists.
§Example
The following example iterates through all nodes with compatible value “virtio,mmio” and prints each node’s name.
TODO
Trait Implementations§
Source§impl<'a, 'dt: 'a> Clone for DevTreeNode<'a, 'dt>
impl<'a, 'dt: 'a> Clone for DevTreeNode<'a, 'dt>
Source§fn clone(&self) -> DevTreeNode<'a, 'dt>
fn clone(&self) -> DevTreeNode<'a, 'dt>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a, 'dt: 'a> PartialEq for DevTreeNode<'a, 'dt>
impl<'a, 'dt: 'a> PartialEq for DevTreeNode<'a, 'dt>
Auto Trait Implementations§
impl<'a, 'dt> Freeze for DevTreeNode<'a, 'dt>
impl<'a, 'dt> RefUnwindSafe for DevTreeNode<'a, 'dt>
impl<'a, 'dt> Send for DevTreeNode<'a, 'dt>
impl<'a, 'dt> Sync for DevTreeNode<'a, 'dt>
impl<'a, 'dt> Unpin for DevTreeNode<'a, 'dt>
impl<'a, 'dt> UnwindSafe for DevTreeNode<'a, 'dt>
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