/// Wait until there is an IPv4 and an IPv6 link-local address assigned to the
/// interface identified by `id`.
///
/// If there are multiple IPv4 or multiple IPv6 link-local addresses assigned,
/// the choice of which particular address to return is arbitrary and should
/// not be relied upon.
///
/// Note that if a `netemul::TestInterface` is available, helpers on said type
/// should be preferred over using this function.
Wait until there is an IPv4 and an IPv6 link-local address assigned to the
interface identified by `id`.

If there are multiple IPv4 or multiple IPv6 link-local addresses assigned,
the choice of which particular address to return is arbitrary and should
not be relied upon.

Note that if a `netemul::TestInterface` is available, helpers on said type
should be preferred over using this function.
Wait until there is an IPv4 and an IPv6 link - local address assigned to the interface identified by ` id ` . If there are multiple IPv4 or multiple IPv6 link - local addresses assigned the choice of which particular address to return is arbitrary and should not be relied upon . Note that if a ` netemul :: TestInterface ` is available helpers on said type should be preferred over using this function .
pub async fn wait_for_v4_and_v6_ll(
    interfaces_state: &fidl_fuchsia_net_interfaces::StateProxy,
    id: u64,
) -> Result<(net_types::ip::Ipv4Addr, net_types::ip::Ipv6Addr)> {
    wait_for_addresses(interfaces_state, id, |addresses| {
        let (v4, v6) = addresses.into_iter().fold(
            (None, None),
            |(v4, v6), &fidl_fuchsia_net_interfaces_ext::Address { value, valid_until: _ }| {
                match value {
                    fidl_fuchsia_net::InterfaceAddress::Ipv4(
                        fidl_fuchsia_net::Ipv4AddressWithPrefix {
                            addr: fidl_fuchsia_net::Ipv4Address { addr },
                            prefix_len: _,
                        },
                    ) => (Some(net_types::ip::Ipv4Addr::from(addr)), v6),
                    fidl_fuchsia_net::InterfaceAddress::Ipv6(fidl_fuchsia_net::Ipv6Address {
                        addr,
                    }) => {
                        let v6_addr = net_types::ip::Ipv6Addr::from_bytes(addr);
                        (v4, if v6_addr.is_unicast_link_local() { Some(v6_addr) } else { v6 })
                    }
                }
            },
        );
        match (v4, v6) {
            (Some(v4), Some(v6)) => Some((v4, v6)),
            _ => None,
        }
    })
    .await
    .context("wait for addresses")
}
pub async fn wait_for_v4_and_v6_ll ( interfaces_state : & fidl_fuchsia_net_interfaces :: StateProxy , id : u64 , ) -> Result < ( net_types :: ip :: Ipv4Addr , net_types :: ip :: Ipv6Addr ) > { wait_for_addresses ( interfaces_state , id , | addresses | { let ( v4 , v6 ) = addresses . into_iter ( ) . fold ( ( None , None ) , | ( v4 , v6 ) , & fidl_fuchsia_net_interfaces_ext :: Address { value , valid_until : _ } | { match value { fidl_fuchsia_net :: InterfaceAddress :: Ipv4 ( fidl_fuchsia_net :: Ipv4AddressWithPrefix { addr : fidl_fuchsia_net :: Ipv4Address { addr } , prefix_len : _ , } , ) => ( Some ( net_types :: ip :: Ipv4Addr :: from ( addr ) ) , v6 ) , fidl_fuchsia_net :: InterfaceAddress :: Ipv6 ( fidl_fuchsia_net :: Ipv6Address { addr , } ) => { let v6_addr = net_types :: ip :: Ipv6Addr :: from_bytes ( addr ) ; ( v4 , if v6_addr . is_unicast_link_local ( ) { Some ( v6_addr ) } else { v6 } ) } } } , ) ; match ( v4 , v6 ) { ( Some ( v4 ) , Some ( v6 ) ) => Some ( ( v4 , v6 ) ) , _ => None , } } ) . await . context ( " " ) }
Wait until there is an IPv4 and an IPv6 link-local address assigned to the
interface identified by `id`.
Wait until there is an IPv4 and an IPv6 link - local address assigned to the interface identified by ` id ` .
interfaces_state
&fidl_fuchsia_net_interfaces::StateProxy
id
u64