[][src]Function safe_app::utils::test_utils::setup_client

pub fn setup_client<Create, Run, A, C, I, T, E, F>(
    context: &A,
    c: Create,
    r: Run
) -> T where
    A: 'static,
    C: Client,
    Create: FnOnce(Handle, UnboundedSender<CoreMsg<C, A>>, UnboundedSender<NetworkEvent>) -> Result<C, F>,
    E: Debug,
    F: Debug,
    I: IntoFuture<Item = T, Error = E> + 'static,
    Run: FnOnce(&C) -> I + Send + 'static,
    T: Send + 'static, 

Helper to create a client and run it in an event loop. Useful when we need to supply credentials explicitly or when Client is to be constructed as unregistered or as a result of successful login. Use this to create Client manually.