| commit | 0fa903349f312d84af88a944e25c595a1f293c06 | [log] [tgz] |
|---|---|---|
| author | Treehugger Robot <[email protected]> | Fri Mar 14 08:23:39 2025 -0700 |
| committer | Gerrit Code Review <[email protected]> | Fri Mar 14 08:23:39 2025 -0700 |
| tree | 08ae92f2e9e783b17cff1c386e7aa7e03e19bd5a | |
| parent | cce29be72c25b2d333cfa67a12d2f561a5d1f226 [diff] | |
| parent | 75a50460e28bcf386dc6515906e2b43fded9566f [diff] |
Merge "Add get() method to declare_binder_enum" into main
diff --git a/libs/binder/rust/src/binder.rs b/libs/binder/rust/src/binder.rs index 6a8a698..771c65b 100644 --- a/libs/binder/rust/src/binder.rs +++ b/libs/binder/rust/src/binder.rs
@@ -1160,6 +1160,12 @@ 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 {