Function relay_test::mock_service

source ยท
pub fn mock_service<S, I, F>(
    name: &'static str,
    state: S,
    f: F,
) -> (Addr<I>, JoinHandle<S>)
where S: Send + 'static, I: Interface, F: FnMut(&mut S, I) + Send + 'static,
Expand description

Spawns a mock service that handles messages through a closure.

Note: Addr must be dropped before handle can be awaited.