[][src]Enum dtb::StructItem

pub enum StructItem<'a> {
    BeginNode {
        name: &'a str,
    },
    Property {
        name: &'a str,
        value: &'a [u8],
    },
    EndNode,
}

DTB structure item.

Variants

BeginNode

Fields of BeginNode

name: &'a str
Property

Fields of Property

name: &'a strvalue: &'a [u8]
EndNode

Methods

impl<'a> StructItem<'a>[src]

pub fn is_begin_node(&self) -> bool[src]

Returns true if the structure item is BeginNode.

pub fn is_property(&self) -> bool[src]

Returns true if the structure item is Property.

pub fn name(&self) -> Result<&'a str>[src]

Returns name for BeginNode or Property structure items.

pub fn node_name(&self) -> Result<&'a str>[src]

Returns node name for BeginNode structure items.

pub fn unit_address(&self) -> Result<&'a str>[src]

Returns unit address for BeginNode structure items.

pub fn value(&self) -> Result<&'a [u8]>[src]

Returns value for Property structure items.

pub fn value_str(&self) -> Result<&'a str>[src]

Returns string value for Property structure items.

pub fn value_str_list<'b>(&self, buf: &'b mut [u8]) -> Result<&'b [&'a str]>[src]

Returns string list value for Property structure items.

pub fn value_u32_list<'b>(&self, buf: &'b mut [u8]) -> Result<&'b [u32]>[src]

Returns integer list value for Property structure items.

Trait Implementations

impl<'a> Debug for StructItem<'a>[src]

impl<'a> PartialEq<StructItem<'a>> for StructItem<'a>[src]

impl<'a> StructuralPartialEq for StructItem<'a>[src]

Auto Trait Implementations

impl<'a> Send for StructItem<'a>

impl<'a> Sync for StructItem<'a>

impl<'a> Unpin for StructItem<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.