# What `.aidl` renders
The spelling the AIDL compiler produces for each kind of type, by position. One scalar stands for its kind: `long`, `float`, `double` and `char` follow the `int` rows as `i64`, `f32`, `f64` and `u16`. `List<T>` and generic parcelables are not listed. A trait written with these is a trait an `.aidl` port reproduces exactly; any other spelling of these types the macro refuses, naming the cell you wanted — except between the `Cfg` and `Mode` rows, which are both a bare name to the macro, and a field's `Option<Box<Cfg>>`, which `.aidl` writes for a `@nullable(heap=true)` parcelable field and for a `@nullable` one that closes a reference cycle.
`—` marks a combination AIDL itself rejects.
<!-- Generated by `type_matrix::the_reference_table_matches_the_rules`.
Do not edit: run `TYPES_MD=overwrite cargo test -p rsbinder-macros`. -->
| AIDL type | `in` | `out` | `#[inout]` | return | field |
|---|---|---|---|---|---|
| `int` | `i32` | — | — | `i32` | `i32` |
| `int[]` | `&[i32]` | `&mut Vec<i32>` | `&mut Vec<i32>` | `Vec<i32>` | `Vec<i32>` |
| `@nullable int[]` | `Option<&[i32]>` | `&mut Option<Vec<i32>>` | `&mut Option<Vec<i32>>` | `Option<Vec<i32>>` | `Option<Vec<i32>>` |
| `int[N]` | `&[i32; N]` | `&mut [i32; N]` | `&mut [i32; N]` | `[i32; N]` | `[i32; N]` |
| `@nullable int[N]` | `Option<&[i32; N]>` | `&mut Option<[i32; N]>` | `&mut Option<[i32; N]>` | `Option<[i32; N]>` | `Option<[i32; N]>` |
| `boolean` | `bool` | — | — | `bool` | `bool` |
| `boolean[]` | `&[bool]` | `&mut Vec<bool>` | `&mut Vec<bool>` | `Vec<bool>` | `Vec<bool>` |
| `@nullable boolean[]` | `Option<&[bool]>` | `&mut Option<Vec<bool>>` | `&mut Option<Vec<bool>>` | `Option<Vec<bool>>` | `Option<Vec<bool>>` |
| `boolean[N]` | `&[bool; N]` | `&mut [bool; N]` | `&mut [bool; N]` | `[bool; N]` | `[bool; N]` |
| `@nullable boolean[N]` | `Option<&[bool; N]>` | `&mut Option<[bool; N]>` | `&mut Option<[bool; N]>` | `Option<[bool; N]>` | `Option<[bool; N]>` |
| `byte` | `i8` | — | — | `i8` | `i8` |
| `byte[]` | `&[u8]` | `&mut Vec<u8>` | `&mut Vec<u8>` | `Vec<u8>` | `Vec<u8>` |
| `@nullable byte[]` | `Option<&[u8]>` | `&mut Option<Vec<u8>>` | `&mut Option<Vec<u8>>` | `Option<Vec<u8>>` | `Option<Vec<u8>>` |
| `byte[N]` | `&[u8; N]` | `&mut [u8; N]` | `&mut [u8; N]` | `[u8; N]` | `[u8; N]` |
| `@nullable byte[N]` | `Option<&[u8; N]>` | `&mut Option<[u8; N]>` | `&mut Option<[u8; N]>` | `Option<[u8; N]>` | `Option<[u8; N]>` |
| `String` | `&str` | — | — | `String` | `String` |
| `@nullable String` | `Option<&str>` | — | — | `Option<String>` | `Option<String>` |
| `String[]` | `&[String]` | `&mut Vec<String>` | `&mut Vec<String>` | `Vec<String>` | `Vec<String>` |
| `@nullable String[]` | `Option<&[Option<String>]>` | `&mut Option<Vec<Option<String>>>` | `&mut Option<Vec<Option<String>>>` | `Option<Vec<Option<String>>>` | `Option<Vec<Option<String>>>` |
| `String[N]` | `&[String; N]` | `&mut [String; N]` | `&mut [String; N]` | `[String; N]` | `[String; N]` |
| `@nullable String[N]` | `Option<&[Option<String>; N]>` | `&mut Option<[Option<String>; N]>` | `&mut Option<[Option<String>; N]>` | `Option<[Option<String>; N]>` | `Option<[Option<String>; N]>` |
| `Cfg` | `&Cfg` | `&mut Cfg` | `&mut Cfg` | `Cfg` | `Cfg` |
| `@nullable Cfg` | `Option<&Cfg>` | `&mut Option<Cfg>` | `&mut Option<Cfg>` | `Option<Cfg>` | `Option<Cfg>` |
| `Cfg[]` | `&[Cfg]` | `&mut Vec<Cfg>` | `&mut Vec<Cfg>` | `Vec<Cfg>` | `Vec<Cfg>` |
| `@nullable Cfg[]` | `Option<&[Option<Cfg>]>` | `&mut Option<Vec<Option<Cfg>>>` | `&mut Option<Vec<Option<Cfg>>>` | `Option<Vec<Option<Cfg>>>` | `Option<Vec<Option<Cfg>>>` |
| `Cfg[N]` | `&[Cfg; N]` | `&mut [Cfg; N]` | `&mut [Cfg; N]` | `[Cfg; N]` | `[Cfg; N]` |
| `@nullable Cfg[N]` | `Option<&[Option<Cfg>; N]>` | `&mut Option<[Option<Cfg>; N]>` | `&mut Option<[Option<Cfg>; N]>` | `Option<[Option<Cfg>; N]>` | `Option<[Option<Cfg>; N]>` |
| `Mode` | `Mode` | — | — | `Mode` | `Mode` |
| `Mode[]` | `&[Mode]` | `&mut Vec<Mode>` | `&mut Vec<Mode>` | `Vec<Mode>` | `Vec<Mode>` |
| `@nullable Mode[]` | `Option<&[Mode]>` | `&mut Option<Vec<Mode>>` | `&mut Option<Vec<Mode>>` | `Option<Vec<Mode>>` | `Option<Vec<Mode>>` |
| `Mode[N]` | `&[Mode; N]` | `&mut [Mode; N]` | `&mut [Mode; N]` | `[Mode; N]` | `[Mode; N]` |
| `@nullable Mode[N]` | `Option<&[Mode; N]>` | `&mut Option<[Mode; N]>` | `&mut Option<[Mode; N]>` | `Option<[Mode; N]>` | `Option<[Mode; N]>` |
| `ParcelFileDescriptor` | `&rsbinder::ParcelFileDescriptor` | — | `&mut rsbinder::ParcelFileDescriptor` | `rsbinder::ParcelFileDescriptor` | `Option<rsbinder::ParcelFileDescriptor>` |
| `@nullable ParcelFileDescriptor` | `Option<&rsbinder::ParcelFileDescriptor>` | — | `&mut Option<rsbinder::ParcelFileDescriptor>` | `Option<rsbinder::ParcelFileDescriptor>` | `Option<rsbinder::ParcelFileDescriptor>` |
| `ParcelFileDescriptor[]` | `&[rsbinder::ParcelFileDescriptor]` | `&mut Vec<Option<rsbinder::ParcelFileDescriptor>>` | `&mut Vec<rsbinder::ParcelFileDescriptor>` | `Vec<rsbinder::ParcelFileDescriptor>` | `Vec<rsbinder::ParcelFileDescriptor>` |
| `@nullable ParcelFileDescriptor[]` | `Option<&[Option<rsbinder::ParcelFileDescriptor>]>` | `&mut Option<Vec<Option<rsbinder::ParcelFileDescriptor>>>` | `&mut Option<Vec<Option<rsbinder::ParcelFileDescriptor>>>` | `Option<Vec<Option<rsbinder::ParcelFileDescriptor>>>` | `Option<Vec<Option<rsbinder::ParcelFileDescriptor>>>` |
| `ParcelFileDescriptor[N]` | `&[rsbinder::ParcelFileDescriptor; N]` | `&mut [Option<rsbinder::ParcelFileDescriptor>; N]` | `&mut [rsbinder::ParcelFileDescriptor; N]` | `[rsbinder::ParcelFileDescriptor; N]` | `[Option<rsbinder::ParcelFileDescriptor>; N]` |
| `@nullable ParcelFileDescriptor[N]` | `Option<&[Option<rsbinder::ParcelFileDescriptor>; N]>` | `&mut Option<[Option<rsbinder::ParcelFileDescriptor>; N]>` | `&mut Option<[Option<rsbinder::ParcelFileDescriptor>; N]>` | `Option<[Option<rsbinder::ParcelFileDescriptor>; N]>` | `Option<[Option<rsbinder::ParcelFileDescriptor>; N]>` |
| `IFoo` | `&rsbinder::Strong<dyn IFoo>` | — | — | `rsbinder::Strong<dyn IFoo>` | `Option<rsbinder::Strong<dyn IFoo>>` |
| `@nullable IFoo` | `Option<&rsbinder::Strong<dyn IFoo>>` | — | — | `Option<rsbinder::Strong<dyn IFoo>>` | `Option<rsbinder::Strong<dyn IFoo>>` |
| `IFoo[]` | `&[rsbinder::Strong<dyn IFoo>]` | `&mut Vec<Option<rsbinder::Strong<dyn IFoo>>>` | `&mut Vec<rsbinder::Strong<dyn IFoo>>` | `Vec<rsbinder::Strong<dyn IFoo>>` | `Vec<rsbinder::Strong<dyn IFoo>>` |
| `@nullable IFoo[]` | `Option<&[Option<rsbinder::Strong<dyn IFoo>>]>` | `&mut Option<Vec<Option<rsbinder::Strong<dyn IFoo>>>>` | `&mut Option<Vec<Option<rsbinder::Strong<dyn IFoo>>>>` | `Option<Vec<Option<rsbinder::Strong<dyn IFoo>>>>` | `Option<Vec<Option<rsbinder::Strong<dyn IFoo>>>>` |
| `IFoo[N]` | `&[rsbinder::Strong<dyn IFoo>; N]` | `&mut [Option<rsbinder::Strong<dyn IFoo>>; N]` | `&mut [rsbinder::Strong<dyn IFoo>; N]` | `[rsbinder::Strong<dyn IFoo>; N]` | `[Option<rsbinder::Strong<dyn IFoo>>; N]` |
| `@nullable IFoo[N]` | `Option<&[Option<rsbinder::Strong<dyn IFoo>>; N]>` | `&mut Option<[Option<rsbinder::Strong<dyn IFoo>>; N]>` | `&mut Option<[Option<rsbinder::Strong<dyn IFoo>>; N]>` | `Option<[Option<rsbinder::Strong<dyn IFoo>>; N]>` | `Option<[Option<rsbinder::Strong<dyn IFoo>>; N]>` |
| `IBinder` | `&rsbinder::SIBinder` | — | — | `rsbinder::SIBinder` | `Option<rsbinder::SIBinder>` |
| `@nullable IBinder` | `Option<&rsbinder::SIBinder>` | — | — | `Option<rsbinder::SIBinder>` | `Option<rsbinder::SIBinder>` |
| `IBinder[]` | `&[rsbinder::SIBinder]` | `&mut Vec<Option<rsbinder::SIBinder>>` | `&mut Vec<rsbinder::SIBinder>` | `Vec<rsbinder::SIBinder>` | `Vec<rsbinder::SIBinder>` |
| `@nullable IBinder[]` | `Option<&[Option<rsbinder::SIBinder>]>` | `&mut Option<Vec<Option<rsbinder::SIBinder>>>` | `&mut Option<Vec<Option<rsbinder::SIBinder>>>` | `Option<Vec<Option<rsbinder::SIBinder>>>` | `Option<Vec<Option<rsbinder::SIBinder>>>` |
| `IBinder[N]` | `&[rsbinder::SIBinder; N]` | `&mut [Option<rsbinder::SIBinder>; N]` | `&mut [rsbinder::SIBinder; N]` | `[rsbinder::SIBinder; N]` | `[Option<rsbinder::SIBinder>; N]` |
| `@nullable IBinder[N]` | `Option<&[Option<rsbinder::SIBinder>; N]>` | `&mut Option<[Option<rsbinder::SIBinder>; N]>` | `&mut Option<[Option<rsbinder::SIBinder>; N]>` | `Option<[Option<rsbinder::SIBinder>; N]>` | `Option<[Option<rsbinder::SIBinder>; N]>` |