Trait lief::pe::resources::NodeBase

pub trait NodeBase {
    // Provided methods
    fn id(&self) -> u32 { ... }
    fn depth(&self) -> u32 { ... }
    fn children(&self) -> Children<'_>  { ... }
    fn name(&self) -> Option<String> { ... }
    fn add_child(&mut self, node: &Node<'_>) -> Node<'_> { ... }
    fn delete_child(&mut self, id: u32) { ... }
}
Expand description

Trait that is shared by both Node::Data and Node::Directory.

Provided Methods§

fn id(&self) -> u32

Integer that identifies the Type, Name, or Language ID of the entry depending on its NodeBase::depth in the tree

fn depth(&self) -> u32

Current depth of the Node in the resource tree

fn children(&self) -> Children<'_>

Iterator on node’s children

fn name(&self) -> Option<String>

Name of the node (if any)

fn add_child(&mut self, node: &Node<'_>) -> Node<'_>

Add a new child node to the current and return the newly-added node

fn delete_child(&mut self, id: u32)

Delete the child node with the given id

Trait Implementations§

§

impl Debug for &dyn NodeBase

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl Display for &dyn NodeBase

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§

§

impl NodeBase for Node<'_>

§

impl NodeBase for Data<'_>

§

impl NodeBase for Directory<'_>