pub enum StructureData<'a> {
BeginNode(&'a str),
EndNode,
Property {
name: &'a str,
value: Value<'a>,
},
}
Expand description
An event that signals the start/end of a node or a property of one while walking the device tree.
Variants§
BeginNode(&'a str)
Indicates that the following events are within the scope of a new node defined as the child of the previous current node.
EndNode
Indicates that the previous current node is complete, and should be popped off the stack and replaced with its parent.
Property
Defines a property of the current node
Fields
name: &'a str
The name of the property.
The Devicetree spec lists a number of common property names, but the system is open for extension, so it may not be recognizable.
value: Value<'a>
The value of the property.
The format of this data depends on the property name. Types defined by the Devicetree spec include:
- empty values,
- null-terminated strings or lists of them,
- big-endian 32-bit or 64-bit integers
- “phandles,” or 32-bit numbers that uniquely identify another node
However, different properties can define their own representation, so it is not possible to infer the type of an unrecognized property.
Trait Implementations§
Source§impl<'a> Clone for StructureData<'a>
impl<'a> Clone for StructureData<'a>
Source§fn clone(&self) -> StructureData<'a>
fn clone(&self) -> StructureData<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more