Crate binder_tokio

Source
Expand description

This crate lets you use the Tokio spawn_blocking pool with AIDL in async Rust code.

This crate works by defining a type Tokio, which you can use as the generic parameter in the async version of the trait generated by the AIDL compiler.

use binder_tokio::Tokio;

binder::get_interface::<dyn SomeAsyncInterface<Tokio>>("...").

Structs§

TokioRuntime
Wrapper around Tokio runtime types for providing a runtime to a binder server.

Enums§

Tokio
Use the Tokio spawn_blocking pool with AIDL.

Functions§

get_interface
Retrieve an existing service for a particular interface, sleeping for a few seconds if it doesn’t yet exist.
wait_for_interface
Retrieve an existing service for a particular interface, or start it if it is configured as a dynamic service and isn’t yet started.