cuprate_p2p_core::client

Function 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