[][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 references 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 counted multiple timse.

Trait Implementations

impl Debug for Context[src]

Auto Trait Implementations

impl RefUnwindSafe for Context

impl Send for Context

impl Sync for Context

impl Unpin for Context

impl UnwindSafe for Context

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.