4.2 AIDL 类型

AIDL 类型 — Comprehensive Rust

译文 · 基于 Comprehensive Rust

原文链接: https://google.github.io/comprehensive-rust/android/aidl/types.html

4.2 AIDL 类型

AIDL 类型会翻译成合适的、符合习惯的 Rust 类型:

  • 原始类型(大多)映射为符合习惯的 Rust 类型。
  • 支持切片、Vec 与字符串类型等集合类型。
  • 对 AIDL 对象与文件句柄的引用可以在客户端与服务之间发送。
  • 完整支持文件句柄与 parcelable。

4.2.1 原始类型

01-原始类型 — Comprehensive Rust

4.2.2 数组类型

02-数组类型 — Comprehensive Rust

4.2.3 发送对象

03-发送对象 — Comprehensive Rust

4.2.4 Parcelable

04-Parcelable — Comprehensive Rust

4.2.5 发送文件

05-发送文件 — Comprehensive Rust

最后修改 August 11, 2026: 更新 (70a5af133)