[][src]Struct deepsize::Context

pub struct Context { /* fields omitted */ }

The context of which references have already been seen. This should only be used in the implementation of the deep_size_of_children function, and (eventually, when this reaches 0.2) will not be able to be constructed, and only obtained from inside the function.

Keeps track of the Arcs, Rcs, and references that have been visited, so that Arcs and other references aren't double counted.

Currently this counts each reference once, although there are arguments for only counting owned data and ignoring partial ownership, or for counting partial refernces such as Arc as its size divided by the strong reference count.

Github Issue discussion here

This must be passed between deep_size_of_children calls when recursing, so that references are not double-counted.

Trait Implementations

impl Debug for Context[src]

Auto Trait Implementations

impl Unpin for Context

impl Sync for Context

impl Send for Context

impl RefUnwindSafe for Context

impl UnwindSafe for Context

Blanket Implementations

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

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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.

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

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

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