Function-pointer wrappers used by Cloneable deps to convert the
constructed value into wire bytes on the parent, and to deserialize those
bytes into a typed value on the worker.
Type-erased, parent-owned cell that holds the owner value behind a
Mutex and exposes a &self dispatch entry point. Constructed by the
macro-generated registration code on the parent (the DependencyConstructor
for a HostedRpc dep returns one of these wrapped in Arc<dyn Any>)
and kept alive in _hosted_owners for the suite’s lifetime.
In-process transport used in --nocapture / single-process mode: the
stub calls the owner-side HostedRpcOwnerCell directly without
touching any IPC stream.
Factory pair stored on a HostedRpcRegisteredDependency. The macro
emits a RpcFactory per registered HostedRpc dep so the runtime can
(a) wrap the constructor’s output into a parent dispatcher cell, and
(b) build a worker-side stub from a channel.
Function pointer-equivalent used by the worker side of a Cloneable
dependency. Receives the deserialized wire payload (boxed as Any for
type erasure) plus the current dependency view, and produces the
reconstructed worker-side value.
Async counterpart of HostedRpcDep. Implement this when the owner-side
method dispatcher needs to .await (e.g. controlling subprocesses, holding
tokio::sync locks, calling other async APIs).
User-facing trait that opts a dependency value into the Cloneable
sharing strategy. The parent calls to_wire once
and ships the bytes to each worker via IPC. Each worker calls
from_wire to reconstruct a local value.
User-facing trait that opts a dependency value into the Hosted
sharing strategy. Like CloneableDep, but the owner instance lives in
the parent test runner process for the entire suite. The parent runs
the constructor once per Hosted dep and keeps the value alive until every
worker has finished — useful for singleton services like an in-process
TCP listener, a Docker container, an env-based test environment, or any
long-running runtime that must not be duplicated across worker processes.
User-facing trait that opts a dependency value into the HostedRpc sharing
strategy. Like HostedDep, the owner lives in the
parent test runner process for the entire suite; unlike Hosted,
workers do NOT see the owner type — they see a separate Stub type
that calls back into the parent over the existing IPC socket through a
small generated method-dispatch table.
Dyn-safe entry point used by the parent runtime to dispatch incoming
[crate::ipc::IpcResponse::HostedRpcCall] frames to a type-erased owner
value. Auto-implemented for every HostedRpcDep.
Trait implemented by the per-runner transport that workers use to send
RPCs to the parent’s owner. The runtime provides a concrete IPC
implementation for the spawn-workers case and a direct in-process
implementation for --nocapture / single-process mode.