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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more