pub struct TestInstance {
pub tt: Arc<dyn TurboTasksApi>,
pub snapshot_and_evict: Box<dyn Fn() + Send + Sync>,
}Expand description
A freshly created test instance: the TurboTasks handle (type-erased to
Arc<dyn TurboTasksApi>) and a closure that, when called, takes a
snapshot and evicts all evictable tasks on that instance.
The eviction closure captures the concrete backend type internally so
harness code holding an erased TurboTasksApi can still reach the
snapshot_and_evict API.
Fields§
§tt: Arc<dyn TurboTasksApi>§snapshot_and_evict: Box<dyn Fn() + Send + Sync>Auto Trait Implementations§
impl !RefUnwindSafe for TestInstance
impl !UnwindSafe for TestInstance
impl Freeze for TestInstance
impl Send for TestInstance
impl Sync for TestInstance
impl Unpin for TestInstance
impl UnsafeUnpin for TestInstance
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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