pub struct ThunkSet(FxHashSet<*const ThunkRepr>);
Expand description
A wrapper type for tracking which thunks have already been seen
in a context. This is necessary for printing and deeply forcing
cyclic non-diverging data structures like rec { f = [ f ]; }
.
This is separate from the ThunkRepr::Blackhole mechanism, which
detects diverging data structures like (rec { f = f; }).f
.
The inner HashSet
is not available on the outside, as it would be
potentially unsafe to interact with the pointers in the set.
Tuple Fields§
§0: FxHashSet<*const ThunkRepr>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ThunkSet
impl !RefUnwindSafe for ThunkSet
impl !Send for ThunkSet
impl !Sync for ThunkSet
impl Unpin for ThunkSet
impl !UnwindSafe for ThunkSet
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more