Struct flat_device_tree::Node
source · 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: String
The 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>
pub fn prop_raw<'a>(&'a self, name: &str) -> Option<&'a Vec<u8>>
pub fn prop_u64(&self, name: &str) -> Result<u64>
pub fn prop_u32(&self, name: &str) -> Result<u32>
pub fn store( &self, structure: &mut Vec<u8>, strings: &mut StringTable ) -> Result<()>
Trait Implementations§
source§impl PartialEq for Node
impl PartialEq for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
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