Function relay_test::mock_service
source ยท pub fn mock_service<S, I, F>(
name: &'static str,
state: S,
f: F,
) -> (Addr<I>, JoinHandle<S>)
Expand description
Spawns a mock service that handles messages through a closure.
Note: Addr must be dropped before handle can be awaited.