Expand description
Executor for running tests with mocked environment
See MockExecutor
Re-exportsΒ§
use std::any::Any;πuse std::cell::Cell;πuse std::collections::VecDeque;πuse std::fmt;πuse std::fmt::Debug;πuse std::fmt::Debug;πuse std::fmt::Display;πuse std::future::Future;πuse std::io;πuse std::io::Write as _;πuse std::iter;πuse std::panic::AssertUnwindSafe;πuse std::panic::catch_unwind;πuse std::panic::panic_any;πuse std::pin::Pin;πuse std::pin::pin;πuse std::sync::Arc;πuse std::sync::Mutex;πuse std::sync::MutexGuard;πuse std::sync::Weak;πuse std::task::Context;πuse std::task::Poll;πuse std::task::RawWaker;πuse std::task::RawWakerVTable;πuse std::task::Waker;πuse futures::FutureExt as _;πuse futures::pin_mut;πuse futures::task::FutureObj;πuse futures::task::Spawn;πuse futures::task::SpawnError;πuse assert_matches::assert_matches;πuse educe::Educe;πuse itertools::Either;πuse itertools::chain;πuse itertools::chain;πuse itertools::izip;πuse slotmap_careful::DenseSlotMap;πuse std::backtrace::Backtrace;πuse strum::EnumIter;πuse tracing::error;πuse tracing::trace;πuse oneshot_fused_workaround as oneshot;πuse oneshot_fused_workaround::Canceled;πuse tor_error::error_report;πuse tor_rtcompat::join_set::FuturesJoinSet;πuse tor_rtcompat::Blocking;πuse tor_rtcompat::JoinSetProvider;πuse tor_rtcompat::ToplevelBlockOn;πuse task_id::Ti as TaskId;πuse itertools::Either::*;πuse Poll::*;πuse TaskState::*;π
ModulesΒ§
- task_id π
- Task id, module to hide
Tialias
StructsΒ§
- Actual
Waker π - Actual implementor of
Wakefor use in aWaker - Data π
- Executorβs state
- Debug
Dump - Debugging dump of a
MockExecutorβs state - Debug
Tasks π - Helper:
Debugs as a list of tasks, given theDatafor lookups and a list of the ids - IsSubthread π
- Marker indicating that this task is a Subthread, not an async task.
- Mock
Executor - Executor for running tests with mocked environment
- Progress
Until πStalled Future - Future from
progress_until_stalled - Progressing
Until πStalled - State used for an in-progress call to
progress_until_stalled - Scheduling
Policy Iter - An iterator over the variants of SchedulingPolicy
- SetAwake π
Shared::subthread_yieldshould set our task awake before switching to the executor- Shared π
- Shared state and ancillary information
- Task π
- Record of a single task
EnumsΒ§
- Scheduling
Policy - How we should schedule?
- Task
Future πInfo - A future as stored in our record of a
Task - Task
State π - State of a task - do we think it needs to be polled?
- Thread
Descriptor π - Identifies a thread we know about - the executor thread, or a Subthread
ConstantsΒ§
- THREAD_
DESCRIPTOR - Identifies this thread.
StaticsΒ§
- RAW_
WAKER_ πVTABLE - vtable for
Box<ActualWaker>asRawWaker
TraitsΒ§
- Ensure
Sync πSend - Trait to let us assert at compile time that something is nicely
Syncetc.
Type AliasesΒ§
- Main
Future π - Future for the argument to
block_on, which is handled specially - Sleep
Location π - We record βwhere a future went to sleepβ as (just) a backtrace
- Task
Future π - Type-erased future, one for each of our (normal) tasks