async fn update_method_to_fidl(
    method_name: String,
    args: Value,
    facade: &UpdateFacade,
) -> Result<Value, Error> {
    Ok(match method_name.parse()? {
        UpdateMethod::GetState => to_value(facade.get_state().await?),
        UpdateMethod::CheckNow => to_value(facade.check_now(args).await?),
        UpdateMethod::GetCurrentChannel => to_value(facade.get_current_channel().await?),
        UpdateMethod::GetTargetChannel => to_value(facade.get_target_channel().await?),
        UpdateMethod::SetTargetChannel => to_value(facade.set_target_channel(args).await?),
        UpdateMethod::GetChannelList => to_value(facade.get_channel_list().await?),
    }?)
}
// Takes SL4F method command and executes corresponding update facade method.
Takes SL4F method command and executes corresponding update facade method.
Takes SL4F method command and executes corresponding update facade method .
async fn update_method_to_fidl(
    method_name: String,
    args: Value,
    facade: &UpdateFacade,
) -> Result<Value, Error> {
    Ok(match method_name.parse()? {
        UpdateMethod::GetState => to_value(facade.get_state().await?),
        UpdateMethod::CheckNow => to_value(facade.check_now(args).await?),
        UpdateMethod::GetCurrentChannel => to_value(facade.get_current_channel().await?),
        UpdateMethod::GetTargetChannel => to_value(facade.get_target_channel().await?),
        UpdateMethod::SetTargetChannel => to_value(facade.set_target_channel(args).await?),
        UpdateMethod::GetChannelList => to_value(facade.get_channel_list().await?),
    }?)
}
async fn update_method_to_fidl ( method_name : String , args : Value , facade : & UpdateFacade , ) -> Result < Value , Error > { Ok ( match method_name . parse ( ) ? { UpdateMethod :: GetState => to_value ( facade . get_state ( ) . await ? ) , UpdateMethod :: CheckNow => to_value ( facade . check_now ( args ) . await ? ) , UpdateMethod :: GetCurrentChannel => to_value ( facade . get_current_channel ( ) . await ? ) , UpdateMethod :: GetTargetChannel => to_value ( facade . get_target_channel ( ) . await ? ) , UpdateMethod :: SetTargetChannel => to_value ( facade . set_target_channel ( args ) . await ? ) , UpdateMethod :: GetChannelList => to_value ( facade . get_channel_list ( ) . await ? ) , } ? ) }
Takes SL4F method command and executes corresponding update facade method.
Takes SL4F method command and executes corresponding update facade method .
method_name
String
args
Value
facade
&UpdateFacade
method_name
String
args
Value
facade
&UpdateFacade