Use binder::IntoBinderResult to simplify error handling
In addition to the trait, a local trait `LogResult` is also added for
the case of logging an error while returning it. ex:
```
let x = some_function()
.context("some message")
.with_log() // if error, log the error message
.or_binder_exception(ExceptionCode::INVALID_ARGUMENT)?;
```
Bug: 294348831
Test: m com.android.virt
Change-Id: I461ba6501be66014f73831f4320a50cd9eee0ae7
diff --git a/virtualizationservice/vfio_handler/Android.bp b/virtualizationservice/vfio_handler/Android.bp
index efbb7b5..9ed17f2 100644
--- a/virtualizationservice/vfio_handler/Android.bp
+++ b/virtualizationservice/vfio_handler/Android.bp
@@ -22,10 +22,11 @@
rustlibs: [
"android.system.virtualizationservice_internal-rust",
"libandroid_logger",
+ "libanyhow",
"libbinder_rs",
+ "liblazy_static",
"liblog_rust",
"libnix",
- "liblazy_static",
],
apex_available: ["com.android.virt"],
}