pub struct Node {
pub name: String,
pub props: Vec<(String, Vec<u8>)>,
pub children: Vec<Node>,
}Expand description
A single node in the device tree.
Fields§
§name: StringThe name of the node, as it appears in the node path.
props: Vec<(String, Vec<u8>)>A list of node properties, (key, value).
children: Vec<Node>Child nodes of this node.
Implementations§
Source§impl Node
impl Node
pub fn find<'a>(&'a self, path: &str) -> Option<&'a Node>
pub fn has_prop(&self, name: &str) -> bool
pub fn prop_str<'a>(&'a self, name: &str) -> Result<&'a str, PropError>
pub fn prop_raw<'a>(&'a self, name: &str) -> Option<&'a Vec<u8>>
pub fn prop_u64(&self, name: &str) -> Result<u64, PropError>
pub fn prop_u32(&self, name: &str) -> Result<u32, PropError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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