fidl_fuchsia_net_interfaces_ext

Function existing

Source
pub async fn existing<S, St, B>(
    stream: St,
    init: B,
) -> Result<B, WatcherOperationError<S, B>>
where S: Debug, St: Stream<Item = Result<EventWithInterest<B::Interest>, Error>>, B: Update<S> + Debug,
Expand description

Read Existing interface events from stream, updating init until the Idle event is detected, returning the resulting state.

Note that stream must be created from a watcher with interest in the correct fields, such as one created from event_stream_from_state.