pub struct PocketIcInstance<T> {
pub instance: T,
pub server: Option<PocketIcManagedServer>,
}Expand description
An upstream instance together with the server owned by its construction.
Fields are ordered so a synchronous PocketIc is deleted before the server
is terminated. Connect mode borrows the caller’s server and returns None.
Native PocketIC operations remain available directly through instance.
Destructuring transfers responsibility for this lifetime ordering to the caller.
PocketIC 16 synchronous deletion has no request deadline and can block drop.
Its nonblocking instance has no automatic deletion: call
instance.drop().await while retaining server when instance deletion matters,
especially with a borrowed server. Dropping an owned server stops all its instances.
Fields§
§instance: TThe upstream synchronous or nonblocking PocketIC instance.
server: Option<PocketIcManagedServer>Exact managed server, or None for a borrowed connection.