1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-05-16 15:45:42 +02:00
Nicole L d7a88211ff
Update AIDL intermediates path (#2639)
---------

Co-authored-by: Martin Geisler <mgeisler@google.com>
2025-02-26 17:28:11 +00:00

920 B

Generated Service API

Binder generates a trait for each interface definition.

birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl:

{{#include ../birthday_service/aidl/com/example/birthdayservice/IBirthdayService.aidl:IBirthdayService}}
}

out/soong/.intermediates/.../com_example_birthdayservice.rs:

trait IBirthdayService {
    fn wishHappyBirthday(&self, name: &str, years: i32) -> binder::Result<String>;
}

Your service will need to implement this trait, and your client will use this trait to talk to the service.

  • Point out how the generated function signature, specifically the argument and return types, correspond the interface definition.
    • String for an argument results in a different Rust type than String as a return type.