Function cuprate_p2p_core::client::mock_client

source ยท
pub fn mock_client<Z: NetworkZone, S>(
    info: PeerInformation<Z::Addr>,
    connection_guard: ConnectionGuard,
    request_handler: S,
) -> Client<Z>
where S: Service<PeerRequest, Response = PeerResponse, Error = BoxError> + Send + 'static, S::Future: Send + 'static,
Expand description

Creates a mock Client for testing purposes.

request_handler will be used to handle requests sent to the Client