mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-15 12:08:59 +00:00
chore(core/rust): add uDebug capability to more places
This commit is contained in:
parent
ef90546324
commit
0be96cb70b
@ -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
|
||||
|
@ -1,4 +1,5 @@
|
||||
/// Common message type for pagination components.
|
||||
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||
pub enum PageMsg<T> {
|
||||
/// Pass-through from paged component.
|
||||
Content(T),
|
||||
|
@ -579,6 +579,7 @@ impl Alignment2D {
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||
pub enum Axis {
|
||||
Horizontal,
|
||||
Vertical,
|
||||
|
@ -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,
|
||||
|
@ -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<F0, F1, F2> =
|
||||
type CancelConfirm<F0, F1> = FixedHeightBar<Split<MsgMap<Button, F0>, MsgMap<Button, F1>>>;
|
||||
|
||||
#[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),
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ use crate::{
|
||||
|
||||
use super::theme;
|
||||
|
||||
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||
pub enum DialogMsg<T, U> {
|
||||
Content(T),
|
||||
Controls(U),
|
||||
|
@ -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,
|
||||
|
@ -21,6 +21,7 @@ pub struct Frame<T> {
|
||||
content: Child<T>,
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||
pub enum FrameMsg<T> {
|
||||
Content(T),
|
||||
Button(CancelInfoConfirmMsg),
|
||||
|
@ -61,6 +61,7 @@ pub struct Homescreen {
|
||||
delay: Timer,
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||
pub enum HomescreenMsg {
|
||||
Dismissed,
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -20,6 +20,7 @@ use crate::{
|
||||
|
||||
use core::cell::Cell;
|
||||
|
||||
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||
pub enum PassphraseKeyboardMsg {
|
||||
Confirmed,
|
||||
Cancelled,
|
||||
|
@ -23,6 +23,7 @@ use crate::{
|
||||
},
|
||||
};
|
||||
|
||||
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||
pub enum PinKeyboardMsg {
|
||||
Confirmed,
|
||||
Cancelled,
|
||||
|
@ -9,6 +9,7 @@ use crate::ui::{
|
||||
};
|
||||
use heapless::Vec;
|
||||
|
||||
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||
pub enum SelectWordCountMsg {
|
||||
Selected(u32),
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ use crate::{
|
||||
|
||||
use super::{theme, Button, ButtonMsg};
|
||||
|
||||
#[cfg_attr(feature = "debug", derive(ufmt::derive::uDebug))]
|
||||
pub enum NumberInputDialogMsg {
|
||||
Selected,
|
||||
InfoRequested,
|
||||
|
Loading…
Reference in New Issue
Block a user