DeserializeNode

Trait DeserializeNode 

Source
pub trait DeserializeNode<'dtb>: Sized {
    // Required method
    fn deserialize(
        blob_node: &Node<'dtb>,
        cx: NodeContext<'_>,
    ) -> Result<(Self, Cursor)>;
}
Expand description

Types that can be parsed from a devicetree node.

Required Methods§

Source

fn deserialize( blob_node: &Node<'dtb>, cx: NodeContext<'_>, ) -> Result<(Self, Cursor)>

Parses a devicetree node into this type.

The second return value is a cursor pointing to the next token after the node.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'dtb> DeserializeNode<'dtb> for Box<[Item<'dtb>]>

Source§

fn deserialize( blob_node: &Node<'dtb>, _cx: NodeContext<'_>, ) -> Result<(Self, Cursor)>

Source§

impl<'dtb> DeserializeNode<'dtb> for Vec<Item<'dtb>>

Source§

fn deserialize( blob_node: &Node<'dtb>, _cx: NodeContext<'_>, ) -> Result<(Self, Cursor)>

Source§

impl<'dtb, T: DeserializeNode<'dtb>> DeserializeNode<'dtb> for Option<T>

Source§

fn deserialize( blob_node: &Node<'dtb>, cx: NodeContext<'_>, ) -> Result<(Self, Cursor)>

Implementors§

Source§

impl<'dtb> DeserializeNode<'dtb> for Node<'dtb>

Source§

impl<'dtb> DeserializeNode<'dtb> for Cursor

Source§

impl<'dtb> DeserializeNode<'dtb> for Device<'dtb>