Struct v8_heap_parser::Graph

source ·
pub struct Graph {
    pub root_index: usize,
    /* private fields */
}

Fields§

§root_index: usize

Implementations§

source§

impl Graph

source

pub fn nodes(&self) -> &[Node<Node>]

Gets a list of all nodes in the graph.

source

pub fn get_node(&self, index: usize) -> Option<&Node>

Gets a node by its index.

source

pub fn get_indexed_string(&self, index: usize) -> Option<&str>

Gets a string by its index. Indexed strings are exposed in the ‘Other’ type in Node and Edge types.

source

pub fn iter(&self) -> NodeIterator<'_>

Gets an iterator over the graph nodes.

source

pub fn children(&self, parent: usize) -> Vec<usize>

Gets a list children of the node at the given index.

source

pub fn retained_size(&self, node_index: usize) -> u64

Gets the retained size of a node in the graph. This is the size this node specifically requires the program to retain., i.e. the nodes the given node dominates https://en.wikipedia.org/wiki/Dominator_(graph_theory)

source

pub fn get_class_groups(&self, no_retained: bool) -> &[ClassGroup]

Gets top-level groups for classes to show in a summary view. Sorted by retained size descending by default.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Graph

§

impl !Send for Graph

§

impl !Sync for Graph

§

impl Unpin for Graph

§

impl UnwindSafe for Graph

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.