Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75a50460 authored by Devin Moore's avatar Devin Moore
Browse files

Add get() method to declare_binder_enum

This returns the value of the enum as the backing type.

Test: atest aidl_integration_test
Bug: 393455995
Change-Id: Ic35021edfdabf59ce2017b91ee4f65953c071c70
parent 69f67e7e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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 {