fidl_fuchsia_net_interfaces_ext::admin

Function assignment_state_stream

Source
pub fn assignment_state_stream(
    address_state_provider: AddressStateProviderProxy,
) -> impl Stream<Item = Result<AddressAssignmentState, AddressStateProviderError>>
Expand description

Returns a stream of assignment states obtained by watching on address_state_provider.

Note that this function calls the hanging get FIDL method [AddressStateProviderProxy::watch_address_assignment_state] internally, which means that this stream should not be polled concurrently with any logic which calls the same hanging get. This also means that callers should be careful not to drop the returned stream when it has been polled but yet to yield an item, e.g. due to a timeout or if using select with another stream, as doing so causes a pending hanging get to get lost, and may cause future hanging get calls to fail or the channel to be closed.