async fn netstack_method_to_fidl(
    method_name: String,
    args: Value,
    facade: &NetstackFacade,
) -> Result<Value, Error> {
    match NetstackMethod::from_str(&method_name) {
        NetstackMethod::InitNetstack => {
            let result = facade.init_netstack_proxy()?;
            Ok(to_value(result)?)
        }
        NetstackMethod::ListInterfaces => {
            let result = facade.list_interfaces().await?;
            Ok(to_value(result)?)
        }
        NetstackMethod::GetInterfaceInfo => {
            let identifier = parse_u64_identifier(args)?;
            let result = facade.get_interface_info(identifier).await?;
            Ok(to_value(result)?)
        }
        NetstackMethod::EnableInterface => {
            let identifier = parse_u64_identifier(args)?;
            let result = facade.enable_interface(identifier).await?;
            Ok(to_value(result)?)
        }
        NetstackMethod::DisableInterface => {
            let identifier = parse_u64_identifier(args)?;
            let result = facade.disable_interface(identifier).await?;
            Ok(to_value(result)?)
        }
        _ => bail!("Invalid Netstack FIDL method: {:?}", method_name),
    }
}
// Takes ACTS method command and executes corresponding Netstack Client
// FIDL methods.
Takes ACTS method command and executes corresponding Netstack Client
FIDL methods.
Takes ACTS method command and executes corresponding Netstack Client FIDL methods .
async fn netstack_method_to_fidl(
    method_name: String,
    args: Value,
    facade: &NetstackFacade,
) -> Result<Value, Error> {
    match NetstackMethod::from_str(&method_name) {
        NetstackMethod::InitNetstack => {
            let result = facade.init_netstack_proxy()?;
            Ok(to_value(result)?)
        }
        NetstackMethod::ListInterfaces => {
            let result = facade.list_interfaces().await?;
            Ok(to_value(result)?)
        }
        NetstackMethod::GetInterfaceInfo => {
            let identifier = parse_u64_identifier(args)?;
            let result = facade.get_interface_info(identifier).await?;
            Ok(to_value(result)?)
        }
        NetstackMethod::EnableInterface => {
            let identifier = parse_u64_identifier(args)?;
            let result = facade.enable_interface(identifier).await?;
            Ok(to_value(result)?)
        }
        NetstackMethod::DisableInterface => {
            let identifier = parse_u64_identifier(args)?;
            let result = facade.disable_interface(identifier).await?;
            Ok(to_value(result)?)
        }
        _ => bail!("Invalid Netstack FIDL method: {:?}", method_name),
    }
}
async fn netstack_method_to_fidl ( method_name : String , args : Value , facade : & NetstackFacade , ) -> Result < Value , Error > { match NetstackMethod :: from_str ( & method_name ) { NetstackMethod :: InitNetstack => { let result = facade . init_netstack_proxy ( ) ? ; Ok ( to_value ( result ) ? ) } NetstackMethod :: ListInterfaces => { let result = facade . list_interfaces ( ) . await ? ; Ok ( to_value ( result ) ? ) } NetstackMethod :: GetInterfaceInfo => { let identifier = parse_u64_identifier ( args ) ? ; let result = facade . get_interface_info ( identifier ) . await ? ; Ok ( to_value ( result ) ? ) } NetstackMethod :: EnableInterface => { let identifier = parse_u64_identifier ( args ) ? ; let result = facade . enable_interface ( identifier ) . await ? ; Ok ( to_value ( result ) ? ) } NetstackMethod :: DisableInterface => { let identifier = parse_u64_identifier ( args ) ? ; let result = facade . disable_interface ( identifier ) . await ? ; Ok ( to_value ( result ) ? ) } _ => bail ! ( " " method_name ) , } }
Takes ACTS method command and executes corresponding Netstack Client
FIDL methods.
Takes ACTS method command and executes corresponding Netstack Client FIDL methods .
method_name
String
args
Value
facade
&NetstackFacade