fidl_fuchsia_net_routes_ext::testutil

Function serve_state_request

Source
pub async fn serve_state_request<'a, I: FidlRouteIpExt>(
    request: <<I::StateMarker as ProtocolMarker>::RequestStream as Stream>::Item,
    event_stream: impl Stream<Item = Vec<I::WatchEvent>> + 'a,
)
Expand description

Serve a GetWatcher request to the State protocol by instantiating a watcher client backed by the given event stream. The returned future drives the watcher implementation.