diff options
author | 2025-03-14 09:15:29 -0700 | |
---|---|---|
committer | 2025-03-14 09:15:29 -0700 | |
commit | 81f7934a4d128f0205f8fb0e5c6f147a153a22be (patch) | |
tree | 927111554fa04a822ed026540414ef69e9f711a4 /libs | |
parent | 12ebdd1483ad28e6d5c21f1d5477a7905819b1b4 (diff) | |
parent | 709de11f8a1909cdc848a93b552bf6fba042c667 (diff) |
Merge "Add get() method to declare_binder_enum" into main am: 0fa903349f am: 709de11f8a
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3483296
Change-Id: I4909414908686a9daf66617209fb844a5e8d8f94
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs')
-rw-r--r-- | libs/binder/rust/src/binder.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/binder/rust/src/binder.rs b/libs/binder/rust/src/binder.rs index 6a8a69843a..771c65bf92 100644 --- a/libs/binder/rust/src/binder.rs +++ b/libs/binder/rust/src/binder.rs @@ -1160,6 +1160,12 @@ macro_rules! declare_binder_enum { pub const fn enum_values() -> [Self; $size] { [$(Self::$name),*] } + + #[inline(always)] + #[allow(missing_docs)] + pub const fn get(&self) -> $backing { + self.0 + } } impl std::fmt::Debug for $enum { |