Struct 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 !Freeze for Graph

§

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>,

Source§

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>,

Source§

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.