pub async fn spawn_kitsune_p2p_with_fn<F, T>(
    config: KitsuneP2pConfig,
    tls_config: TlsConfig,
    build_host: F
) -> Result<(GhostSender<KitsuneP2p>, Receiver<KitsuneP2pEvent>, T), KitsuneP2pError>
where F: FnOnce(GhostSender<KitsuneP2p>) -> Pin<Box<dyn Future<Output = (T, Arc<dyn KitsuneHost>)> + Send>>,
Expand description

Spawn a new KitsuneP2p actor, using a closure to generate the HostApi. Used for some test cases where the HostApi requires some of the intermediate values created by this function.