pub async fn add_address_wait_assigned(
    control: &fidl_fuchsia_net_interfaces_ext::admin::Control,
    mut address: fidl_fuchsia_net::InterfaceAddress,
    address_parameters: fidl_fuchsia_net_interfaces_admin::AddressParameters,
) -> std::result::Result<
    fidl_fuchsia_net_interfaces_admin::AddressStateProviderProxy,
    fidl_fuchsia_net_interfaces_ext::admin::AddressStateProviderError,
> {
    let (address_state_provider, server) = fidl::endpoints::create_proxy::<
        fidl_fuchsia_net_interfaces_admin::AddressStateProviderMarker,
    >()
    .expect("create proxy");
    let () = control
        .add_address(&mut address, address_parameters, server)
        .expect("Control.AddAddress FIDL error");

    {
        let state_stream = fidl_fuchsia_net_interfaces_ext::admin::assignment_state_stream(
            address_state_provider.clone(),
        );
        futures::pin_mut!(state_stream);
        let () = fidl_fuchsia_net_interfaces_ext::admin::wait_assignment_state(
            &mut state_stream,
            fidl_fuchsia_net_interfaces_admin::AddressAssignmentState::Assigned,
        )
        .await?;
    }
    Ok(address_state_provider)
}
/// Add an address, returning once the assignment state is `Assigned`.
Add an address, returning once the assignment state is `Assigned`.
Add an address returning once the assignment state is ` Assigned ` .
pub async fn add_address_wait_assigned(
    control: &fidl_fuchsia_net_interfaces_ext::admin::Control,
    mut address: fidl_fuchsia_net::InterfaceAddress,
    address_parameters: fidl_fuchsia_net_interfaces_admin::AddressParameters,
) -> std::result::Result<
    fidl_fuchsia_net_interfaces_admin::AddressStateProviderProxy,
    fidl_fuchsia_net_interfaces_ext::admin::AddressStateProviderError,
> {
    let (address_state_provider, server) = fidl::endpoints::create_proxy::<
        fidl_fuchsia_net_interfaces_admin::AddressStateProviderMarker,
    >()
    .expect("create proxy");
    let () = control
        .add_address(&mut address, address_parameters, server)
        .expect("Control.AddAddress FIDL error");
    {
        let state_stream = fidl_fuchsia_net_interfaces_ext::admin::assignment_state_stream(
            address_state_provider.clone(),
        );
        futures::pin_mut!(state_stream);
        let () = fidl_fuchsia_net_interfaces_ext::admin::wait_assignment_state(
            &mut state_stream,
            fidl_fuchsia_net_interfaces_admin::AddressAssignmentState::Assigned,
        )
        .await?;
    }
    Ok(address_state_provider)
}
pub async fn add_address_wait_assigned ( control : & fidl_fuchsia_net_interfaces_ext :: admin :: Control , mut address : fidl_fuchsia_net :: InterfaceAddress , address_parameters : fidl_fuchsia_net_interfaces_admin :: AddressParameters , ) -> std :: result :: Result < fidl_fuchsia_net_interfaces_admin :: AddressStateProviderProxy , fidl_fuchsia_net_interfaces_ext :: admin :: AddressStateProviderError , > { let ( address_state_provider , server ) = fidl :: endpoints :: create_proxy :: < fidl_fuchsia_net_interfaces_admin :: AddressStateProviderMarker , > ( ) . expect ( " " ) ; let ( ) = control . add_address ( & mut address , address_parameters , server ) . expect ( " " ) ; { let state_stream = fidl_fuchsia_net_interfaces_ext :: admin :: assignment_state_stream ( address_state_provider . clone ( ) , ) ; futures :: pin_mut ! ( state_stream ) ; let ( ) = fidl_fuchsia_net_interfaces_ext :: admin :: wait_assignment_state ( & mut state_stream , fidl_fuchsia_net_interfaces_admin :: AddressAssignmentState :: Assigned , ) . await ? ; } Ok ( address_state_provider ) }
Add an address, returning once the assignment state is `Assigned`.
Add an address returning once the assignment state is ` Assigned ` .
control
&fidl_fuchsia_net_interfaces_ext::admin::Control
address
fidl_fuchsia_net::InterfaceAddress
address_parameters
fidl_fuchsia_net_interfaces_admin::AddressParameters
control
&fidl_fuchsia_net_interfaces_ext::admin::Control
address
fidl_fuchsia_net::InterfaceAddress
address_parameters
fidl_fuchsia_net_interfaces_admin::AddressParameters