pub trait PocketIcBuilderExt {
// Required method
fn try_build(
self,
config: PocketIcStartupConfig,
) -> Result<PocketIc, PocketIcStartupError>;
}Expand description
Fallible construction at PocketIC’s panicking builder boundary.
Startup is explicit: callers either provide an existing server URL or let
ic-testkit spawn and monitor one exact server binary. This prevents the
upstream builder from hiding an unobservable child process.
Required Methods§
Sourcefn try_build(
self,
config: PocketIcStartupConfig,
) -> Result<PocketIc, PocketIcStartupError>
fn try_build( self, config: PocketIcStartupConfig, ) -> Result<PocketIc, PocketIcStartupError>
Build one PocketIC instance within the configured deadline.
Managed server startup detects child exit while awaiting the port file, terminates the child on timeout, and captures bounded stdout/stderr. Instance creation is also bounded. Upstream panics remain structured.
This deadline covers construction only. Dropping the returned instance uses PocketIC’s synchronous HTTP deletion, which has no request deadline in PocketIC 16. An operation’s maximum request time does not bound drop.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".