diff options
author | 2025-03-14 08:23:39 -0700 | |
---|---|---|
committer | 2025-03-14 08:23:39 -0700 | |
commit | 0fa903349f312d84af88a944e25c595a1f293c06 (patch) | |
tree | 08ae92f2e9e783b17cff1c386e7aa7e03e19bd5a | |
parent | cce29be72c25b2d333cfa67a12d2f561a5d1f226 (diff) | |
parent | 75a50460e28bcf386dc6515906e2b43fded9566f (diff) |
Merge "Add get() method to declare_binder_enum" into main
-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 { |