diff options
author | 2025-03-14 08:52:48 -0700 | |
---|---|---|
committer | 2025-03-14 08:52:48 -0700 | |
commit | 709de11f8a1909cdc848a93b552bf6fba042c667 (patch) | |
tree | 08ae92f2e9e783b17cff1c386e7aa7e03e19bd5a /libs | |
parent | dd1edea9fb0432b44857f28ea81d91dfe192a97d (diff) | |
parent | 0fa903349f312d84af88a944e25c595a1f293c06 (diff) |
Merge "Add get() method to declare_binder_enum" into main am: 0fa903349f
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3483296
Change-Id: I138a178ff8672dd2da967d017b657ead0b772c0d
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 { |