pub struct Node<'a> {
pub name: &'a str,
/* private fields */
}
Expand description
A parsed FDT node.
Fields§
§name: &'a str
The name for this node.
Implementations§
Source§impl<'a> Node<'a>
impl<'a> Node<'a>
Sourcepub fn children(&self) -> NodeIter<'a> ⓘ
pub fn children(&self) -> NodeIter<'a> ⓘ
Returns an iterator to parse through children of this node.
Sourcepub fn properties(&self) -> PropertyIter<'a> ⓘ
pub fn properties(&self) -> PropertyIter<'a> ⓘ
Returns an iterator to parse through properties of this node.
Sourcepub fn find_property(
&self,
name: &str,
) -> Result<Option<Property<'a>>, Error<'a>>
pub fn find_property( &self, name: &str, ) -> Result<Option<Property<'a>>, Error<'a>>
Find a property with a given name.
Returns Ok(None)
if the property does not exist.
Returns an error if this node’s properties are unable to be parsed.
This method is O(n) for the number of properties on this node, as the
Self::properties
is used to perform a linear search.
Auto Trait Implementations§
impl<'a> Freeze for Node<'a>
impl<'a> RefUnwindSafe for Node<'a>
impl<'a> Send for Node<'a>
impl<'a> Sync for Node<'a>
impl<'a> Unpin for Node<'a>
impl<'a> UnwindSafe for Node<'a>
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