diff --git a/core/embed/rust/src/ui/component/base.rs b/core/embed/rust/src/ui/component/base.rs index 28bfa7175..4fe0a6031 100644 --- a/core/embed/rust/src/ui/component/base.rs +++ b/core/embed/rust/src/ui/component/base.rs @@ -26,6 +26,7 @@ use super::Paginate; /// Type used by components that do not return any messages. /// /// Alternative to the yet-unstable `!`-type. +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum Never {} /// User interface is composed of components that can react to `Event`s through diff --git a/core/embed/rust/src/ui/component/paginated.rs b/core/embed/rust/src/ui/component/paginated.rs index 4db937824..4c4efb62b 100644 --- a/core/embed/rust/src/ui/component/paginated.rs +++ b/core/embed/rust/src/ui/component/paginated.rs @@ -1,4 +1,5 @@ /// Common message type for pagination components. +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum PageMsg { /// Pass-through from paged component. Content(T), diff --git a/core/embed/rust/src/ui/geometry.rs b/core/embed/rust/src/ui/geometry.rs index 50a9c1e27..dde44132e 100644 --- a/core/embed/rust/src/ui/geometry.rs +++ b/core/embed/rust/src/ui/geometry.rs @@ -579,6 +579,7 @@ impl Alignment2D { } #[derive(Copy, Clone, PartialEq, Eq)] +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum Axis { Horizontal, Vertical, diff --git a/core/embed/rust/src/ui/model_tt/component/bl_confirm.rs b/core/embed/rust/src/ui/model_tt/component/bl_confirm.rs index ab268d1d9..30526f3b6 100644 --- a/core/embed/rust/src/ui/model_tt/component/bl_confirm.rs +++ b/core/embed/rust/src/ui/model_tt/component/bl_confirm.rs @@ -32,6 +32,7 @@ const CONTENT_AREA: Rect = Rect::new( ); #[derive(Copy, Clone, ToPrimitive)] +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum ConfirmMsg { Cancel = 1, Confirm = 2, diff --git a/core/embed/rust/src/ui/model_tt/component/button.rs b/core/embed/rust/src/ui/model_tt/component/button.rs index 725756cc3..162505589 100644 --- a/core/embed/rust/src/ui/model_tt/component/button.rs +++ b/core/embed/rust/src/ui/model_tt/component/button.rs @@ -16,6 +16,7 @@ use crate::{ use super::theme; +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum ButtonMsg { Pressed, Released, @@ -551,6 +552,7 @@ impl Button { } } +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum CancelConfirmMsg { Cancelled, Confirmed, @@ -562,12 +564,14 @@ type CancelInfoConfirm = type CancelConfirm = FixedHeightBar, MsgMap>>; #[derive(Clone, Copy)] +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum CancelInfoConfirmMsg { Cancelled, Info, Confirmed, } +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum SelectWordMsg { Selected(usize), } diff --git a/core/embed/rust/src/ui/model_tt/component/dialog.rs b/core/embed/rust/src/ui/model_tt/component/dialog.rs index c33b3cef2..23679a492 100644 --- a/core/embed/rust/src/ui/model_tt/component/dialog.rs +++ b/core/embed/rust/src/ui/model_tt/component/dialog.rs @@ -16,6 +16,7 @@ use crate::{ use super::theme; +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum DialogMsg { Content(T), Controls(U), diff --git a/core/embed/rust/src/ui/model_tt/component/fido.rs b/core/embed/rust/src/ui/model_tt/component/fido.rs index c83def9b6..2cb10950d 100644 --- a/core/embed/rust/src/ui/model_tt/component/fido.rs +++ b/core/embed/rust/src/ui/model_tt/component/fido.rs @@ -23,6 +23,7 @@ const SCROLLBAR_HEIGHT: i16 = 10; const APP_NAME_PADDING: i16 = 12; const APP_NAME_HEIGHT: i16 = 30; +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum FidoMsg { Confirmed(usize), Cancelled, diff --git a/core/embed/rust/src/ui/model_tt/component/frame.rs b/core/embed/rust/src/ui/model_tt/component/frame.rs index bbfa77dd0..d989204e6 100644 --- a/core/embed/rust/src/ui/model_tt/component/frame.rs +++ b/core/embed/rust/src/ui/model_tt/component/frame.rs @@ -21,6 +21,7 @@ pub struct Frame { content: Child, } +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum FrameMsg { Content(T), Button(CancelInfoConfirmMsg), diff --git a/core/embed/rust/src/ui/model_tt/component/homescreen/mod.rs b/core/embed/rust/src/ui/model_tt/component/homescreen/mod.rs index 600fbb96c..4fd8f6f63 100644 --- a/core/embed/rust/src/ui/model_tt/component/homescreen/mod.rs +++ b/core/embed/rust/src/ui/model_tt/component/homescreen/mod.rs @@ -61,6 +61,7 @@ pub struct Homescreen { delay: Timer, } +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum HomescreenMsg { Dismissed, } diff --git a/core/embed/rust/src/ui/model_tt/component/keyboard/mnemonic.rs b/core/embed/rust/src/ui/model_tt/component/keyboard/mnemonic.rs index 9899f3fed..94bbe5d7d 100644 --- a/core/embed/rust/src/ui/model_tt/component/keyboard/mnemonic.rs +++ b/core/embed/rust/src/ui/model_tt/component/keyboard/mnemonic.rs @@ -13,6 +13,7 @@ use crate::{ pub const MNEMONIC_KEY_COUNT: usize = 9; +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum MnemonicKeyboardMsg { Confirmed, Previous, diff --git a/core/embed/rust/src/ui/model_tt/component/keyboard/passphrase.rs b/core/embed/rust/src/ui/model_tt/component/keyboard/passphrase.rs index 93e003344..d1795c0b3 100644 --- a/core/embed/rust/src/ui/model_tt/component/keyboard/passphrase.rs +++ b/core/embed/rust/src/ui/model_tt/component/keyboard/passphrase.rs @@ -20,6 +20,7 @@ use crate::{ use core::cell::Cell; +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum PassphraseKeyboardMsg { Confirmed, Cancelled, diff --git a/core/embed/rust/src/ui/model_tt/component/keyboard/pin.rs b/core/embed/rust/src/ui/model_tt/component/keyboard/pin.rs index e373c2f58..3cd478ee2 100644 --- a/core/embed/rust/src/ui/model_tt/component/keyboard/pin.rs +++ b/core/embed/rust/src/ui/model_tt/component/keyboard/pin.rs @@ -23,6 +23,7 @@ use crate::{ }, }; +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum PinKeyboardMsg { Confirmed, Cancelled, diff --git a/core/embed/rust/src/ui/model_tt/component/keyboard/word_count.rs b/core/embed/rust/src/ui/model_tt/component/keyboard/word_count.rs index f6c9d8b68..ac785b7f3 100644 --- a/core/embed/rust/src/ui/model_tt/component/keyboard/word_count.rs +++ b/core/embed/rust/src/ui/model_tt/component/keyboard/word_count.rs @@ -9,6 +9,7 @@ use crate::ui::{ }; use heapless::Vec; +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum SelectWordCountMsg { Selected(u32), } diff --git a/core/embed/rust/src/ui/model_tt/component/number_input.rs b/core/embed/rust/src/ui/model_tt/component/number_input.rs index 5bab784a5..0d342a639 100644 --- a/core/embed/rust/src/ui/model_tt/component/number_input.rs +++ b/core/embed/rust/src/ui/model_tt/component/number_input.rs @@ -17,6 +17,7 @@ use crate::{ use super::{theme, Button, ButtonMsg}; +#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))] pub enum NumberInputDialogMsg { Selected, InfoRequested,