Enum dtb::StructItem
source · pub enum StructItem<'a> {
BeginNode {
name: &'a str,
},
Property {
name: &'a str,
value: &'a [u8],
},
EndNode,
}
Expand description
DTB structure item.
Variants§
Implementations§
source§impl<'a> StructItem<'a>
impl<'a> StructItem<'a>
sourcepub fn is_begin_node(&self) -> bool
pub fn is_begin_node(&self) -> bool
Returns true if the structure item is BeginNode.
sourcepub fn is_property(&self) -> bool
pub fn is_property(&self) -> bool
Returns true if the structure item is Property.
sourcepub fn unit_address(&self) -> Result<&'a str>
pub fn unit_address(&self) -> Result<&'a str>
Returns unit address for BeginNode structure items.
sourcepub fn value_str_list<'b>(&self, buf: &'b mut [u8]) -> Result<&'b [&'a str]>
pub fn value_str_list<'b>(&self, buf: &'b mut [u8]) -> Result<&'b [&'a str]>
Returns string list value for Property structure items.
sourcepub fn value_u32_list<'b>(&self, buf: &'b mut [u8]) -> Result<&'b [u32]>
pub fn value_u32_list<'b>(&self, buf: &'b mut [u8]) -> Result<&'b [u32]>
Returns integer list value for Property structure items.