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
sourceimpl<'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.
Trait Implementations
sourceimpl<'a> Debug for StructItem<'a>
impl<'a> Debug for StructItem<'a>
sourceimpl<'a> PartialEq<StructItem<'a>> for StructItem<'a>
impl<'a> PartialEq<StructItem<'a>> for StructItem<'a>
sourcefn eq(&self, other: &StructItem<'a>) -> bool
fn eq(&self, other: &StructItem<'a>) -> bool
impl<'a> StructuralPartialEq for StructItem<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for StructItem<'a>
impl<'a> Send for StructItem<'a>
impl<'a> Sync for StructItem<'a>
impl<'a> Unpin for StructItem<'a>
impl<'a> UnwindSafe for StructItem<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more