[−][src]Struct deepsize::Context
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 Arc
s, Rc
s, and references
that have been visited, so that Arc
s 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.
This must be passed between deep_size_of_children
calls when
recursing, so that references are not counted multiple timse.
Trait Implementations
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,